]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
strftime-portability-20080528
authorJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 29 May 2008 05:02:36 +0000 (05:02 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 29 May 2008 05:02:36 +0000 (05:02 +0000)
LICENSE MIT

%T is not portable to Windows.  Replace it with the equivalent %H:%M:%S
format string.

src/budb/server.c
src/ptserver/display.c
src/vol/vol-salvage.c

index bd52d9606857d5c17fd188842130be0f2e18ed75..1da790052d6769150f489b2415f017a0dea26673 100644 (file)
@@ -661,7 +661,7 @@ TimeStamp(time_t t)
     static char timestamp[20];
 
     lt = localtime(&t);
-    strftime(timestamp, 20, "%m/%d/%Y %T", lt);
+    strftime(timestamp, 20, "%m/%d/%Y %H:%M:%S", lt);
     return timestamp;
 }
 
index 4126831c45a0e16845a8a4f66c1b82aa24c1a461..76bcb5e545aa89a28d6604dcc40c79020cfdbb26 100644 (file)
@@ -46,9 +46,9 @@ pr_TimeToString(time_t clock)
     }
     tm = localtime(&clock);
     if (tm->tm_year != this_year)
-       strftime(buffer, 32, "%m/%d/%Y %T", tm);
+       strftime(buffer, 32, "%m/%d/%Y %H:%M:%S", tm);
     else
-       strftime(buffer, 32, "%m/%d %T", tm);
+       strftime(buffer, 32, "%m/%d %H:%M:%S", tm);
     return buffer;
 }
 #endif
index 7161272f2151ff450756e36b40da455c7d25ec1d..7ac31c879e1103e782b53f29c1f9e709fb4652c9 100644 (file)
@@ -3372,7 +3372,7 @@ TimeStamp(time_t clock, int precision)
     static char timestamp[20];
     lt = localtime(&clock);
     if (precision)
-       (void)strftime(timestamp, 20, "%m/%d/%Y %T", lt);
+       (void)strftime(timestamp, 20, "%m/%d/%Y %H:%M:%S", lt);
     else
        (void)strftime(timestamp, 20, "%m/%d/%Y %H:%M", lt);
     return timestamp;