summaryrefslogtreecommitdiff
path: root/src/timedate
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-11-23 16:29:35 +0100
committerLennart Poettering <lennart@poettering.net>2012-11-23 16:29:35 +0100
commit2af32104c47dadf426f2e7697cd7382520476fc5 (patch)
treeb6bef689b852e0bd0772404626c0976392e46b01 /src/timedate
parent525716e2f9de779cba3e92d9135b2de64e937aa8 (diff)
timedatctl: bring manual strftime in sync with format_timestamp()
Diffstat (limited to 'src/timedate')
-rw-r--r--src/timedate/timedatectl.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c
index 1a6cc61170..e17f631566 100644
--- a/src/timedate/timedatectl.c
+++ b/src/timedate/timedatectl.c
@@ -124,12 +124,12 @@ static void print_status_info(StatusInfo *i) {
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);
@@ -139,7 +139,7 @@ static void print_status_info(StatusInfo *i) {
/* 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);
}
@@ -168,11 +168,11 @@ static void print_status_info(StatusInfo *i) {
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"
" %s\n"
@@ -181,11 +181,11 @@ static void print_status_info(StatusInfo *i) {
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"
" %s\n"