locale, returns two digit year

Asked by Theodore M Rolle, Jr.

I downloaded alarm-clock-applet-0.3.4 to compile from source

./configure completes successfully.

make fails with the message:
util.c: In function ‘get_alarm_timestamp’:
util.c:57:31: error: ‘%c’ yields only last 2 digits of year in some locales [-Werror=format-y2k]
  strftime (tmp, sizeof (tmp), "%c", tm);

So?
Fix it programatically instead of diagnosing the problem and giving up.

if (year < 100) {
    year += 2000;
} else {
    // Leave 4-digit year alone.
}
--- OR ----
 year = (year < 100) ? year+2000 : year;

Question information

Language:
English Edit question
Status:
Expired
For:
Alarm Clock Applet Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.