See systemd-timedated.service(8) and org.freedesktop.timedate1(5)
busctl introspect org.freedesktop.timedate1 /org/freedesktop/timedate1
# Values are stripped
org.freedesktop.DBus.Properties interface -
Desktop environments use this interface.
I would not be surprised to find an "Automatic time zone" checkbox in GUI settings similar to e.g. Android.
I am not going to discuss code posted by Albretch, despite it has serious issues from my point of view. This is a response to Greg.
On 20/12/2023 22:04, Greg Wooledge wrote:
The default time zone has nothing to do with systemd, nor with any other init system that may be in place. Systemd does not know or care about
the system's default time zone.
See systemd-timedated.service(8) and org.freedesktop.timedate1(5)
busctl introspect org.freedesktop.timedate1 /org/freedesktop/timedate1
# Values are stripped
org.freedesktop.DBus.Properties interface -
.PropertiesChanged signal sa{sv}as org.freedesktop.timedate1 interface -
.SetTimezone method sb
.Timezone property s
Desktop environments use this interface.
Max Nikulin wrote:
I am not going to discuss code posted by Albretch, despite it has serious issues from my point of view. This is a response to Greg.
On 20/12/2023 22:04, Greg Wooledge wrote:
The default time zone has nothing to do with systemd, nor with any other init system that may be in place. Systemd does not know or care about the system's default time zone.
See systemd-timedated.service(8) and org.freedesktop.timedate1(5)
busctl introspect org.freedesktop.timedate1 /org/freedesktop/timedate1
# Values are stripped
org.freedesktop.DBus.Properties interface -
.PropertiesChanged signal sa{sv}as org.freedesktop.timedate1 interface -
.SetTimezone method sb
.Timezone property s
Desktop environments use this interface.
Is this set per-user? Because I certainly have multiple users on
the same computer at the same time from different timezones. And
it is quite possible on a few of those machines to have multiple
desktop users, each from a different TZ.
I think you will find a fair number of Unix & Linux servers set a
default timezone. I sometimes have to set TZ in my bashrc because of
an unexpected default timezone. Or that's been my experience at the
GCC Compile Farm, <https://gcc.gnu.org/wiki/CompileFarm>.
I've sometimes the impression that desktop environments are losing
the concept pf multi-user operating systems and are regreding to
something like Windows 95.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 307 |
Nodes: | 16 (2 / 14) |
Uptime: | 29:01:50 |
Calls: | 6,907 |
Calls today: | 1 |
Files: | 12,376 |
Messages: | 5,427,679 |
Posted today: | 1 |