From 040a4a93b57a444b28e25d3a07bd51e2738ceec7 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Thu, 29 May 2008 05:04:25 +0000 Subject: [PATCH] DEVEL15-strftime-portability-20080528 LICENSE MIT %T is not portable to Windows. Replace it with the equivalent %H:%M:%S format string. (cherry picked from commit 11350e8024c8413dab5f91cfcd2155d26356329f) --- src/budb/server.c | 2 +- src/ptserver/display.c | 4 ++-- src/vol/vol-salvage.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/budb/server.c b/src/budb/server.c index bd52d9606..1da790052 100644 --- a/src/budb/server.c +++ b/src/budb/server.c @@ -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; } diff --git a/src/ptserver/display.c b/src/ptserver/display.c index 4126831c4..76bcb5e54 100644 --- a/src/ptserver/display.c +++ b/src/ptserver/display.c @@ -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 diff --git a/src/vol/vol-salvage.c b/src/vol/vol-salvage.c index c33de4a5a..e5eee60e7 100644 --- a/src/vol/vol-salvage.c +++ b/src/vol/vol-salvage.c @@ -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; -- 2.39.5