code: def dt_to_filetime(dt):
      
      if (dt.tzinfo is None) or (dt.tzinfo.utcoffset(dt) is None):
          dt = dt.replace(tzinfo=utc)
      ft = EPOCH_AS_FILETIME + (timegm(dt.timetuple()) * HUNDREDS_OF_NANOSECONDS)
      return ft + (dt.microsecond * 10)
docs: Converts a datetime to Microsoft filetime format. If the object is
      time zone-naive, it is forced to UTC before conversion.
  
      >>> "%.0f" % dt_to_filetime(datetime(2009, 7, 25, 23, 0))
      '128930364000000000'
  
      >>> "%.0f" % dt_to_filetime(datetime(1970, 1, 1, 0, 0, tzinfo=utc))
      '116444736000000000'
  
      >>> "%.0f" % dt_to_filetime(datetime(1970, 1, 1, 0, 0))
      '116444736000000000'
      
      >>> dt_to_filetime(datetime(2009, 7, 25, 23, 0, 0, 100))
      128930364000001000