Module Name: src
Committed By: christos
Date: Sun Aug 14 13:41:17 UTC 2011
Modified Files:
src/usr.bin/at: at.c
Log Message:
Provide a consistent date/time format instead of a
locale-specific one that might have 2 digit years
To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/usr.bin/at/at.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/at/at.c
diff -u src/usr.bin/at/at.c:1.28 src/usr.bin/at/at.c:1.29
--- src/usr.bin/at/at.c:1.28 Wed Nov 24 12:40:41 2010
+++ src/usr.bin/at/at.c Sun Aug 14 09:41:17 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: at.c,v 1.28 2010/11/24 17:40:41 christos Exp $ */
+/* $NetBSD: at.c,v 1.29 2011/08/14 13:41:17 christos Exp $ */
/*
* at.c : Put file into atrun queue
@@ -72,7 +72,7 @@
#if 0
static char rcsid[] = "$OpenBSD: at.c,v 1.15 1998/06/03 16:20:26 deraadt Exp $";
#else
-__RCSID("$NetBSD: at.c,v 1.28 2010/11/24 17:40:41 christos Exp $");
+__RCSID("$NetBSD: at.c,v 1.29 2011/08/14 13:41:17 christos Exp $");
#endif
#endif
@@ -466,7 +466,15 @@
runtimer = 60 * (time_t)ctm;
runtime = *localtime(&runtimer);
+#if 1
+ /*
+ * Provide a consistent date/time format instead of a
+ * locale-specific one that might have 2 digit years
+ */
+ (void)strftime(timestr, TIMESIZE, "%T %F", &runtime);
+#else
(void)strftime(timestr, TIMESIZE, "%X %x", &runtime);
+#endif
if (first) {
(void)printf("%-*s %-*s %-*s %s\n",
(int)strlen(timestr), "Date",