. Advertisement .
..3..
. Advertisement .
..4..
Why get 2009-11-10 23:00:00 +0000 UTC when using time.Now()? Here is the code that I run:
package main
import (
"fmt"
"time"
)
func main() {
fmt.Println(time.Now())
}
Can someone share with me your knowledge and experience?
The reason why you get 2009-11-10 23:00:00 +0000 UTC when using time.Now():
As stated in the Go Tour limits, it is the unchanged time which is used in the Go Tour.
The time in the playground starts at 23:00:00 UTC on November 10th, 2009. (The reader has an excercise to determine the sigificance of this date). By providing deterministic output, it becomes easier to cache programs.
Are you certain you weren’t executing code when you were there? You can download and run the tour if it’s a local version.
This is Go Lang’s birthday time and date.
This is the time that they use in the Go Tour. So, perhaps you are the one running the tour.