Yea - argument doesn’t hold much water. Log files either use timezonr agnostic times or the users know they will change if the time zone changes.
> On Mar 1, 2022, at 6:05 PM, Carl <carle...@gmail.com> wrote: > > I'm interested in the reason for the current behaviour. > I know there are ways to work around it and am aware of the consequences of a > change to the stdlib now. > I'm also aware of what will happen if the timezone changes on a standard > system. > I assume all platforms that Go supports support the ability to change the > timezone without rebooting the system and they already handle it. > > If that's the case, why does Go ignore the case that the time zone can change > when a program is running? > > Please don't misunderstand me - I love Go and really respect the design > decisions that went into the language. > This is why I'm interested in the reason for the current behaviour - to learn. > > I would really appreciate a reply from someone who can provide the actual > reason the time package was implemented this way. > >> On Wednesday, March 2, 2022 at 12:51:37 PM UTC+13 ren...@ix.netcom.com wrote: >> Have a background routine that polls the os every N secs - but the OP can do >> that themselves. >> >>>> On Mar 1, 2022, at 5:32 PM, Kurtis Rader <kra...@skepticism.us> wrote: >>>> >>> >>>>> On Tue, Mar 1, 2022 at 2:55 PM Carl <carl...@gmail.com> wrote: >>>> >>>>> I would like to understand the reasoning for the implementation, if >>>>> possible. >>>>> >>>>> Simple example: >>>>> I have a laptop running Ubuntu (or any other popular Linux distro). >>>>> I fly from New Zealand to Los Angeles >>>>> I open my laptop and change the timezone via the system GUI (which under >>>>> the hood uses timedatectl which updates /etc/timezone and /etc/localtime) >>>>> >>>>> If I had running services written in Go, they would not be aware of the >>>>> timezone change. >>>>> >>>>> Questions I have: >>>>> Why doesn't Go respect standard time zone changes? >>>>> Is there a recommended way to address this? >>>> >>>> How would Go do that in a cross-platform manner? Also, many long running >>>> programs may produce output (e.g., log files) where you don't want a TZ >>>> change to affect the output. Even if this capability were added to the Go >>>> stdlib it should be opt-in, not the default behavior. >>>> >>>> -- >>>> Kurtis Rader >>>> Caretaker of the exceptional canines Junior and Hank >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "golang-nuts" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to golang-nuts...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD-xUMPXMy6WM_vf1O83mVV7TROam84uCJthRLnzjSY2cQ%40mail.gmail.com. > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/92c53e08-b24d-42a1-bba5-88ac55c91fafn%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/18B69EF2-E8A2-4373-9E7B-DF00CCB4B96A%40ix.netcom.com.