code: def datetime(value):
      
      if isinstance(value, (date, builtin_datetime)):
          pass
      elif value < 10000000000:
          value = unix2datetime(value)
      else:
          value = milli2datetime(value)
  
      return datetime2string(value, "%Y-%m-%d %H:%M:%S.%f").rstrip(".000000").rstrip("000")
docs: Convert from unix timestamp to GMT string
      :param value:  unix timestamp
      :return: string with GMT time