time: Now doesn't update when timezone is changed #46417
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
)?Does this issue reproduce with the latest release?
it's the latest release
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Changing the system timezone with
timedatectl set-timezone <tz>
doesn't change the output oftime.Now()
until the go program is restarted.To reproduce, run a simple program that prints
time.Now()
, like the one below, and change the system timezone while it is running.The output doesn't get updated with the new time/timezone until the program is restarted
What did you expect to see?
The datetime should change to the new timezone
What did you see instead?
The datetime remains the same until the program is restarted
The text was updated successfully, but these errors were encountered: