code: func RFC3339FromTime(t time.Time) string {
  	if IsZoneKnown(t) {
  		t = t.UTC()
  	}
  	if t.UnixNano()%1e9 == 0 {
  		return t.Format(time.RFC3339)
  	}
  	return t.Format(time.RFC3339Nano)
  }
docs: // RFC3339FromTime returns an RFC3339-formatted time.
  //
  // If the timezone is known, the time will be converted to UTC and
  // returned with a "Z" suffix. For unknown zones, the timezone will be
  // "-00:01" (1 minute west of UTC).
  //
  // Fractional seconds are only included if the time has fractional
  // seconds.