Nov 2, 2019

[Go] time.Now().Format()

time.Now().Format("20060102150405")


time.Now() is assuming in local time zone.
Formatting it requires fetching the local time zone information to
decide how much to offset the time from UTC when printing it.
The local time zone information is cached, pay penalty price at first call.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.