time: TZ/DST AddDate() problem - Two consecutive days with 23h duration #41272
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?go version go1.15.1 linux/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://play.golang.org/p/F0pGumkcKVb
What did you expect to see?
All days except one are 24h. The day on which DST is introduced should be 23h long.
What did you see instead?
In the loop I'm always adding one day. But Chile started using DST on 6 September (at midnight!). And weirdly there are two days that are 23h long.
The root of the problem is probably that
time.Date(2020, 9, 6, 0, 0, 0, 0, loc@"America/Santiago")
returns 2020-09-05 23:00:00 -04 rather than 2020-09-06 00:00:00 -03.The text was updated successfully, but these errors were encountered: