-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Closed
Copy link
Labels
FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.Issue is not actionable because of missing required information, which needs to be provided.
Milestone
Description
$ go version
go version go1.15.6 darwin/amd64
Does this issue reproduce with the latest release?
Yes
What did you do?
This is just an opinion, but I think that the the time library should provide a simpler method for getting the Epoch time.
I was surprised by this:
t := time.Unix(int64(0), 0)
log.Println("Time is ", t.String())
log.Println("Is time zero: ", t.IsZero())
log.Println("Is time epoch: ", t == time.Unix(int64(0), 0))
Time is 1969-12-31 19:00:00 -0500 EST
Is time zero: false
Is time epoch: true
Upon further inspection I realized that I needed to do time.Unix(0, 0).UTC() to get the epoch value because time.Unix() is timezone aware. Given that the API already has a time.isZero() method, I think there should be a method for fetching the environment's epoch value directly, without using a parsing method or a timezone aware method.
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.Issue is not actionable because of missing required information, which needs to be provided.