In
|
tzdb::current_zone() const |
, the linux code immediately reads the /etc/timezone file, while many programs support the TZ environment variable.
For example, if you execute the following:
TZ="Etc/UTC" date
TZ="Europe/Brussels" date
it results in:
Tue Jul 14 08:01:49 AM UTC 2026
Tue Jul 14 10:01:49 AM CEST 2026
One would expect similar behavior when using tzdb::current_zone()
In
date/src/tz.cpp
Line 4201 in 7875f43
For example, if you execute the following:
it results in:
One would expect similar behavior when using tzdb::current_zone()