I'm trying to understand what the difference is between time.Now()
and time.Now().Local()
. I started by printing them out on my laptop (running Ubuntu 18.04):
fmt.Println(time.Now())
fmt.Println(time.Now().Local())
which gives me
2018-12-23 19:57:08.606595466 +0100 CET m=+0.000583834
2018-12-23 19:57:08.606667843 +0100 CET
I'm not sure what the m=+0.000583834
is. Maybe the difference between my machine and the NTP servers?
I then checked out the docs on .Now()
and .Local()
, which read:
Now returns the current local time.
and
Local returns t with the location set to local time.
Both of them return local time, so I'm still unsure what the difference is. I tried searching around, but I couldn't really find definite answers.
Could anyone shed some light on this?