You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Package log can print out timestamps with the Ldate/Ltime/Lmicroseconds flags, but the time displayed is in local time without a time zone (http://play.golang.org/p/848Wa50X0d). The machines on which I run software don't always agree on the timezone (PST/PDT for laptop, UTC for server), which makes this output sometimes confusing.
Is there a way for the log lines to be unambiguous? Maybe
Set the "Local" timezone of the entire process to "UTC"
Add a flag to package log to force its timezone to "UTC"
Add a flag to package log to print the timezone as part of the prefix
I'd like to see the third option, but I'm open to solutions that don't require changes to the stdlib. Thanks!
The text was updated successfully, but these errors were encountered:
Package
log
can print out timestamps with theLdate
/Ltime
/Lmicroseconds
flags, but the time displayed is in local time without a time zone (http://play.golang.org/p/848Wa50X0d). The machines on which I run software don't always agree on the timezone (PST/PDT for laptop, UTC for server), which makes this output sometimes confusing.Is there a way for the log lines to be unambiguous? Maybe
log
to force its timezone to "UTC"log
to print the timezone as part of the prefixI'd like to see the third option, but I'm open to solutions that don't require changes to the stdlib. Thanks!
The text was updated successfully, but these errors were encountered: