Hi Will! For Windows, there is some context here https://github.com/golang/go/issues/21881
I think the short answer is that Windows does time zones differently enough that there would be subtle bugs introduced, and only on Windows, if we tried to use the Windows info, and nobody wanted to volunteer to do the painstaking, long, slog of dealing with that, and in dealing with versions of windows might not have the needed data. It is much simpler (and fewer bugs) if Go programs on all platforms are reading the same timezone data. I for one prefer it that way. That said, I'm sure if you wanted to go to the trouble of translating Windows timezone info into Go compatible timezone info, and/or teaching the Go runtime how to read timezone info from Windows, and providing a suitable fallback when Windows doesn't have it, then by all means. Since you will need the fallback anyway, I don't see it being worth the effort. I would always want the option to keep the timezone info consistent across all platforms; for my own sanity if nothing else. Best, Jason On Wednesday, November 27, 2024 at 9:03:16 PM UTC-5 will....@gmail.com wrote: > I read in a recent Go issue that Go uses time zone data in GOROOT for > Windows and Plan 9. > > I looked through the Go proposal documents, but couldn't find one for the > time package that had the original reasons, but I assume the reasons are > because Windows didn't used to have IANA-compatible time zone info, and > Plan 9 still doesn't. > > Can anyone point me to info about why Go doesn't use the time zone info in > the Windows registry instead? It looks like there is now a full mapping > from IANA zones to Windows zones > <https://superuser.com/questions/1709147/history-explanation-for-time-zones-on-windows> > . > > I'm also curious why Plan 9 doesn't include a tzdata or zoneinfo database > file for programs to use for time zone logic/math, like most OSs, if anyone > happens to know. I understand wanting to keep the system time simple, but > the database still seems useful for generally doing math with times from > different time zones. Why not just include it for programs? > > Will > -- 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 visit https://groups.google.com/d/msgid/golang-nuts/342a5f7d-724c-4fbc-ad65-59599756ec9fn%40googlegroups.com.