From 13f20ab1fad3f7620a1eb31937ff0d1021e5590b Mon Sep 17 00:00:00 2001 From: Danny Mayer Date: Wed, 19 Dec 2001 03:46:57 +0000 Subject: [PATCH] Update isc_time_formattimestamp to use the 12-Dec-2001 style of datestamp. Fix badtime to be 99-Bad-9999 --- lib/isc/unix/time.c | 4 ++-- lib/isc/win32/include/isc/time.h | 4 ++-- lib/isc/win32/time.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/isc/unix/time.c b/lib/isc/unix/time.c index 6d4be948ba..9406cd94e0 100644 --- a/lib/isc/unix/time.c +++ b/lib/isc/unix/time.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: time.c,v 1.44 2001/12/17 02:55:05 marka Exp $ */ +/* $Id: time.c,v 1.45 2001/12/19 03:46:52 mayer Exp $ */ #include @@ -408,5 +408,5 @@ isc_time_formattimestamp(const isc_time_t *t, char *buf, unsigned int len) { snprintf(buf + flen, len - flen, ".%03u", t->nanoseconds / 1000000); else - snprintf(buf, len, "Bad 00 99:99:99.999"); + snprintf(buf, len, "99-Bad-9999 99:99:99.999"); } diff --git a/lib/isc/win32/include/isc/time.h b/lib/isc/win32/include/isc/time.h index 94d5405dc8..5c7cea3287 100644 --- a/lib/isc/win32/include/isc/time.h +++ b/lib/isc/win32/include/isc/time.h @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: time.h,v 1.24 2001/11/19 03:08:32 mayer Exp $ */ +/* $Id: time.h,v 1.25 2001/12/19 03:46:57 mayer Exp $ */ #ifndef ISC_TIME_H #define ISC_TIME_H 1 @@ -234,7 +234,7 @@ void isc_time_formattimestamp(const isc_time_t *t, char *buf, unsigned int len); /* * Format the time 't' into the buffer 'buf' of length 'len', - * using a format like "Aug 30 04:06:47.997" and the local time zone. + * using a format like "30-Aug-2000 04:06:47.997" and the local time zone. * If the text does not fit in the buffer, the result is indeterminate, * but is always guaranteed to be null terminated. * diff --git a/lib/isc/win32/time.c b/lib/isc/win32/time.c index 5e4fe486e0..fafd7b5025 100644 --- a/lib/isc/win32/time.c +++ b/lib/isc/win32/time.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: time.c,v 1.34 2001/11/19 03:08:28 mayer Exp $ */ +/* $Id: time.c,v 1.35 2001/12/19 03:46:55 mayer Exp $ */ #include @@ -220,12 +220,12 @@ isc_time_formattimestamp(const isc_time_t *t, char *buf, unsigned int len) { char DateBuf[50]; char TimeBuf[50]; - static const char badtime[] = "Bad 00 99:99:99.999"; + static const char badtime[] = "99-Bad-9999 99:99:99.999"; REQUIRE(len > 0); if (FileTimeToLocalFileTime(&t->absolute, &localft) && FileTimeToSystemTime(&localft, &st)) { - GetDateFormat(LOCALE_USER_DEFAULT, 0, &st, "MMM d", DateBuf, + GetDateFormat(LOCALE_USER_DEFAULT, 0, &st, "dd-MMM-yyyy", DateBuf, 50); GetTimeFormat(LOCALE_USER_DEFAULT, TIME_NOTIMEMARKER| TIME_FORCE24HOURFORMAT, &st, NULL, TimeBuf, 50);