Вам нужна функция time.Format
. Замените «myTime.String ()» на «myTime.Format (layout)» с желаемым макетом в качестве аргумента (например, предварительно определенным «time.RFC3339» или форматом эталонного времени «2006-01-02 15: 04: 05.000000- 07 ").
go do c:
func (t Time) Format(layout string) string
Format returns a textual representation of the time value formatted
according to layout, which defines the format by showing how the reference
time, defined to be
Mon Jan 2 15:04:05 -0700 MST 2006
would be displayed if it were the value; it serves as an example of the
desired output. The same display rules will then be applied to the time
value.
A fractional second is represented by adding a period and zeros to the end
of the seconds section of layout string, as in "15:04:05.000" to format a
time stamp with millisecond precision.
Predefined layouts ANSIC, UnixDate, RFC3339 and others describe standard and
convenient representations of the reference time. For more information about
the formats and the definition of the reference time, see the documentation
for ANSIC and the other constants defined by this package.