code: def to_utc(a_datetime, keep_utc_tzinfo=False):
      
      if a_datetime.tzinfo:
          utc_datetime = a_datetime.astimezone(utc)  # convert to utc time
          if keep_utc_tzinfo is False:
              utc_datetime = utc_datetime.replace(tzinfo=None)
          return utc_datetime
      else:
          return a_datetime
docs: Convert a time awared datetime to utc datetime.
  
      :param a_datetime: a timezone awared datetime. (If not, then just returns)
      :param keep_utc_tzinfo: whether to retain the utc time zone information.
  
      **中文文档**
  
      将一个带时区的时间转化成UTC时间。而对于UTC时间而言, 有没有时区信息都无所谓了。