[systemd-devel] Specifying calendar events in an arbitrary timezone

Lennart Poettering lennart at poettering.net
Thu Dec 15 17:35:15 UTC 2016


On Thu, 15.12.16 17:52, Ran Benita (ran234 at gmail.com) wrote:

> My question: is this not supported on purpose (because timezones suck),
> or because it's just not implemented/hard to implement?

Current systemd actually supports calendar events with timezone
specifications. However, the specified time zone must either be "UTC"
or identical to the one configured in /etc/localtime, which doesn't
make it particularly useful I guess (the reason we support this is so
that any timestamp we spit out can also be parsed againt as calendar
event specification, and out timestamps after all do include a
timezone specification).

We'd love to support any kind of timezone specifications, but glibc
does not offer a suitable API for that. We could change around the $TZ
env var all the time when doing time calculations, but that's just
awful.

For most locale-dependent function calls glibc nowadays provides
"locale_t" arguments in order to run them with a different locale. It
would be great if it had a matching "timezone_t" type or so which
would allow running time-specific functions with a different timezone.

So yeah, we'd love to support this, but are waiting for a suitable API.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list