code: def utc_datetime(dt=None, local_value=True):
  	
  	# TODO: rename local_value to local_tz or in_local_tz
  	if dt is None:
  		return datetime.now(tz=timezone.utc)
  
  	result = dt
  	if result.utcoffset() is None:
  		if local_value is False:
  			return result.replace(tzinfo=timezone.utc)
  		else:
  			result = result.replace(tzinfo=local_tz())
  
  	return result.astimezone(timezone.utc)
docs: Convert local datetime and/or datetime without timezone information to UTC datetime with timezone
  	information.
  
  	:param dt: local datetime to convert. If is None, then system datetime value is used
  	:param local_value: whether dt is a datetime in system timezone or UTC datetime without timezone information
  	:return: datetime in UTC with tz set