sec = (time_t) (n / USEC_PER_SEC);
zero(tm);
- assert_se(strftime(a, sizeof(a), "%a, %Y-%m-%d %H:%M:%S %Z", localtime_r(&sec, &tm)) > 0);
+ assert_se(strftime(a, sizeof(a), "%a %Y-%m-%d %H:%M:%S %Z", localtime_r(&sec, &tm)) > 0);
char_array_0(a);
printf(" Local time: %s\n", a);
zero(tm);
- assert_se(strftime(a, sizeof(a), "%a, %Y-%m-%d %H:%M:%S UTC", gmtime_r(&sec, &tm)) > 0);
+ assert_se(strftime(a, sizeof(a), "%a %Y-%m-%d %H:%M:%S UTC", gmtime_r(&sec, &tm)) > 0);
char_array_0(a);
printf(" Universal time: %s\n", a);
/* Calculcate the week-day */
mktime(&tm);
- assert_se(strftime(a, sizeof(a), "%a, %Y-%m-%d %H:%M:%S", &tm) > 0);
+ assert_se(strftime(a, sizeof(a), "%a %Y-%m-%d %H:%M:%S", &tm) > 0);
char_array_0(a);
printf(" RTC time: %s\n", a);
}
zero(tm);
- assert_se(strftime(a, sizeof(a), "%z", localtime_r(&sec, &tm)) > 0);
+ assert_se(strftime(a, sizeof(a), "%Z, %z", localtime_r(&sec, &tm)) > 0);
char_array_0(a);
- printf(" Timezone: %s\n"
- " UTC offset: %s\n"
+ printf(" Timezone: %s (%s)\n"
" NTP enabled: %s\n"
"NTP synchronized: %s\n"
" RTC in local TZ: %s\n",
t = tc - 1;
zero(tm);
- assert_se(strftime(a, sizeof(a), "%a, %Y-%m-%d %H:%M:%S %Z", localtime_r(&t, &tm)) > 0);
+ assert_se(strftime(a, sizeof(a), "%a %Y-%m-%d %H:%M:%S %Z", localtime_r(&t, &tm)) > 0);
char_array_0(a);
zero(tm);
- assert_se(strftime(b, sizeof(b), "%a, %Y-%m-%d %H:%M:%S %Z", localtime_r(&tc, &tm)) > 0);
+ assert_se(strftime(b, sizeof(b), "%a %Y-%m-%d %H:%M:%S %Z", localtime_r(&tc, &tm)) > 0);
char_array_0(b);
- printf(" Last DST change: DST became %s\n"
+ printf(" Last DST change: DST %s at\n"
" %s\n"
" %s\n",
- is_dstc ? "active" : "inactive", a, b);
+ is_dstc ? "began" : "ended", a, b);
t = tn - 1;
zero(tm);
- assert_se(strftime(a, sizeof(a), "%a, %Y-%m-%d %H:%M:%S %Z", localtime_r(&t, &tm)) > 0);
+ assert_se(strftime(a, sizeof(a), "%a %Y-%m-%d %H:%M:%S %Z", localtime_r(&t, &tm)) > 0);
char_array_0(a);
zero(tm);
- assert_se(strftime(b, sizeof(b), "%a, %Y-%m-%d %H:%M:%S %Z", localtime_r(&tn, &tm)) > 0);
+ assert_se(strftime(b, sizeof(b), "%a %Y-%m-%d %H:%M:%S %Z", localtime_r(&tn, &tm)) > 0);
char_array_0(b);
- printf(" Next DST change: DST will become %s, the clock will jump %s\n"
+ printf(" Next DST change: DST %s (the clock jumps %s) at\n"
" %s\n"
" %s\n",
- is_dstn ? "active" : "inactive", jump_str(dn, s, sizeof(s)), a, b);
+ is_dstn ? "begins" : "ends", jump_str(dn, s, sizeof(s)), a, b);
free(zc);
free(zn);
case ARG_VERSION:
puts(PACKAGE_STRING);
- puts(DISTRIBUTION);
puts(SYSTEMD_FEATURES);
return 0;