Systemd/src/timedate
Zbigniew Jędrzejewski-Szmek 14ce0c25c2 timedatectl: stop using xstrftime
When using strftime in arbitrary locales, we cannot really say how big the
buffer should be. Let's make the buffer "large", which will work fine pretty
much always, and just print n/a if the timestamp does not fit. strftime returns
0 if the buffer is too small and a NUL-terminated string otherwise, so we
can drop the size specifications in string formatting.

$ export LANG=fa_IR.UTF-8
$ date
چهارشنبه ۱۸ اكتبر ۱۷، ساعت ۱۰:۵۴:۲۴ (+0330)
$ timedatectl
Assertion 'xstrftime: a[] must be big enough' failed at ../src/timedate/timedatectl.c:105, function print_status_info(). Aborting.

now:

$ timedatectl
        Local time: چهارشنبه 2017-10-18 16:29:40 CEST
    Universal time: چهارشنبه 2017-10-18 14:29:40 UTC
          RTC time: چهارشنبه 2017-10-18 14:29:40
…

https://bugzilla.redhat.com/show_bug.cgi?id=1503452
2017-10-18 16:30:37 +02:00
..
meson.build build-sys: use #if Y instead of #ifdef Y everywhere 2017-10-04 12:09:29 +02:00
org.freedesktop.timedate1.conf relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
org.freedesktop.timedate1.policy.in polkit: add "imply" rules to a number of polkit actions 2012-12-31 21:24:26 +01:00
org.freedesktop.timedate1.service relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
timedatectl.c timedatectl: stop using xstrftime 2017-10-18 16:30:37 +02:00
timedated.c tree-wide: add SD_ID128_MAKE_STR, remove LOG_MESSAGE_ID 2017-02-15 00:45:12 -05:00