Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/at Provide a consistent date/time format instead of a
details: https://anonhg.NetBSD.org/src/rev/1c81fcfdcdc9
branches: trunk
changeset: 768325:1c81fcfdcdc9
user: christos <christos%NetBSD.org@localhost>
date: Sun Aug 14 13:41:17 2011 +0000
description:
Provide a consistent date/time format instead of a
locale-specific one that might have 2 digit years
diffstat:
usr.bin/at/at.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r 4062f0e7094a -r 1c81fcfdcdc9 usr.bin/at/at.c
--- a/usr.bin/at/at.c Sun Aug 14 13:29:26 2011 +0000
+++ b/usr.bin/at/at.c Sun Aug 14 13:41:17 2011 +0000
@@ -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",
Home |
Main Index |
Thread Index |
Old Index