code: def to_utc(value, defaulttz=None):
      
      if defaulttz is None:
          defaulttz = tzlocal()
      return _convert(value, tzutc(), defaulttz)
docs: Convert datetime.datetime time to UTC
  
      If value doesn't have tzinfo, then defaulttz is set.
      Default value of defaulttz is local time zone.