-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
Description
The example for time.Time.Truncate suggests truncating by time.Hour, but in fact Truncate does not do what the user probably wants if the timezone is not hour-aligned.
e.g. https://play.golang.org/p/hAfBrYWNeZ
I suggest just removing the time.Hour example, and possibly explicitly suggest that Truncate cannot be used for times >= time.Hour because of timezones.
I doubt we can actually change the implementation of Truncate at this point, so I've marked this a Documentation bug.
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.