[systemd-commits] src/timedate
Lennart Poettering
lennart at kemper.freedesktop.org
Fri Nov 23 07:29:41 PST 2012
src/timedate/timedatectl.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
New commits:
commit 2af32104c47dadf426f2e7697cd7382520476fc5
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Nov 23 16:29:35 2012 +0100
timedatctl: bring manual strftime in sync with format_timestamp()
diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c
index 1a6cc61..e17f631 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"
More information about the systemd-commits
mailing list