https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114645
--- Comment #13 from Hristo Venev ---
> $TZ allows you to override it per-process (and even change it during the
> lifetime of a process by using setenv and tzset). We don't support that for
> current_zone().
/etc/localtime can also change.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114645
--- Comment #11 from Hristo Venev ---
I never said that reading $TZ is easy, just that not doing it is (in my
opinion) wrong.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114645
--- Comment #9 from Hristo Venev ---
I stumbled upon this comment in the library you linked:
https://github.com/HowardHinnant/date/blob/0e65940a7fbc4ed617a1ee111a60311eccbead9a/include/date/tz.h#L35
That comment is wrong in its explanation of
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114645
--- Comment #7 from Hristo Venev ---
I was actually trying to fix a bug in an existing application that I didn't
write that is using std::chrono::current_zone() under the assumption that it
returns some good approximation of what should be consi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114645
--- Comment #4 from Hristo Venev ---
> What does "quite a bit completely useless" mean? current_zone() tells you
> what /etc/localtime is set to. So it's as useless as /etc/localtime, no more
> and no less.
What I mean is that in its current
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114645
--- Comment #2 from Hristo Venev ---
That makes current_zone() quite a bit completely useless and means that
practically every use of current_zone() is most likely a bug.
Is there some way to get the timezone libc would consider local?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114645
Bug ID: 114645
Summary: std::chrono::current_zone ignores $TZ on Linux
Product: gcc
Version: 13.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: