Bug 57411 - timedatectl returns a failed assertion on strftime when in fr_FR locale
Summary: timedatectl returns a failed assertion on strftime when in fr_FR locale
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-22 14:05 UTC by tuxce
Modified: 2012-11-23 23:33 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description tuxce 2012-11-22 14:05:47 UTC
The command output describes the bug :
$ timedatectl
      Local time: jeu., 2012-11-22 14:50:18 CET
  Universal time: jeu., 2012-11-22 13:50:18 UTC
        RTC time: jeu., 2012-11-22 13:50:17
        Timezone: Europe/Paris
      UTC offset: +0100
     NTP enabled: no
NTP synchronized: no
 RTC in local TZ: no
      DST active: no
Assertion 'strftime(a, sizeof(a), "%a, %Y-%m-%d %H:%M:%S %Z", localtime_r(&t, &tm)) > 0' failed at src/timedate/timedatectl.c:171, function print_status_info(). Aborting.
Abandon (core dumped)


I think it was introduced by this commit : http://cgit.freedesktop.org/systemd/systemd/commit/src/shared/util.h?id=684341b073c4c5f7339e14ebc6a3e0df849e4eb7

#define FORMAT_TIMESTAMP_MAX (5+11+9+4+1)

5 is for weekday+comma+space, but week days in french have 4 digits.
Comment 1 Kay Sievers 2012-11-22 17:49:56 UTC
That seems to be the reason for the failure. Thanks a lot for nice and precise
report. Fix committed:
  http://cgit.freedesktop.org/systemd/systemd/commit/?id=79263d03926af6e0a7f97bf70afb2cd37bdcf9db

$ LANG=fr_FR ./timedatectl 
      Local time: jeu., 2012-11-22 18:49:43 CET
  Universal time: jeu., 2012-11-22 17:49:43 UTC
        RTC time: jeu., 2012-11-22 17:49:43
        Timezone: Europe/Berlin
      UTC offset: +0100
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
      DST active: no
 Last DST change, DST became inactive
                  dim., 2012-10-28 02:59:59 CEST
                  dim., 2012-10-28 02:00:00 CET
 Next DST change, DST will become active, the clock will jump one hour forward
                  dim., 2013-03-31 01:59:59 CET
                  dim., 2013-03-31 03:00:00 CEST


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.