From 53117157f7f3f51b8153ae6afbbee64d014688d1 Mon Sep 17 00:00:00 2001 From: wrowe Date: Fri, 10 Jan 2003 23:17:33 +0000 Subject: To divine the timezone and daylight savings time, effective as of the given date, we need to change our strategy altogether from the old FileTimeToLocalFileTime to the SystemTimeToTzSpecificLocalTime API. We also need to leave the responsibility of mapping tm_gmtoff and tm_isdst to the caller, because this isn't the function that can best guess at the gyrations. This code tests out fine after introducing %R to the win32 extra translations. However, there is still the time zone disparity since the existing tests only succeed on PST machines. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64286 13f79535-47bb-0310-9956-ffa450edef68 --- time/win32/timestr.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'time/win32/timestr.c') diff --git a/time/win32/timestr.c b/time/win32/timestr.c index 513418357..6c93c6290 100644 --- a/time/win32/timestr.c +++ b/time/win32/timestr.c @@ -159,7 +159,8 @@ APR_DECLARE(apr_status_t) apr_ctime(char *date_str, apr_time_t t) #ifndef _WIN32_WCE int win32_strftime_extra(char *s, size_t max, const char *format, - const struct tm *tm) { + const struct tm *tm) +{ /* If the new format string is bigger than max, the result string won't fit * anyway. If format strings are added, made sure the padding below is * enough */ @@ -192,6 +193,11 @@ int win32_strftime_extra(char *s, size_t max, const char *format, i += 2; j += 11; break; + case 'R': + memcpy(new_format + j, "%H:%M", 5); + i += 2; + j += 5; + break; case 'T': memcpy(new_format + j, "%H:%M:%S", 8); i += 2; -- cgit v1.2.1