]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Update isc_time_formattimestamp to use the 12-Dec-2001 style of datestamp. Fix badti...
authorDanny Mayer <source@isc.org>
Wed, 19 Dec 2001 03:46:57 +0000 (03:46 +0000)
committerDanny Mayer <source@isc.org>
Wed, 19 Dec 2001 03:46:57 +0000 (03:46 +0000)
lib/isc/unix/time.c
lib/isc/win32/include/isc/time.h
lib/isc/win32/time.c

index 6d4be948ba7aeb4c192ff96ee75c9f0c4364c447..9406cd94e040223fc621b236f202e5328f3c6249 100644 (file)
@@ -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 <config.h>
 
@@ -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");
 }
index 94d5405dc8d433fb6351a330f7df04397532813f..5c7cea32873c4c9bc1cc7088b1fbdfa22cff836d 100644 (file)
@@ -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.
  *
index 5e4fe486e0c3fdef321ff4db8afa56a484c9feb2..fafd7b50250422f361039ab0034b837a28bf38f0 100644 (file)
@@ -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 <config.h>
 
@@ -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);