Author: rjung
Date: Wed Sep  9 12:53:48 2015
New Revision: 1701991

URL: http://svn.apache.org/r1701991
Log:
Adjust timezone offset for DST.
Followup to r1698316.

Modified:
    tomcat/jk/trunk/native/common/jk_status.c

Modified: tomcat/jk/trunk/native/common/jk_status.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_status.c?rev=1701991&r1=1701990&r2=1701991&view=diff
==============================================================================
--- tomcat/jk/trunk/native/common/jk_status.c (original)
+++ tomcat/jk/trunk/native/common/jk_status.c Wed Sep  9 12:53:48 2015
@@ -785,11 +785,18 @@ static const char *windows_strftime_prep
     char *found = strstr(pattern, JK_WINDOWS_TIMEZONE_PLACEHOLDER);
     if (found != NULL && sz > strlen(pattern)) {
         TIME_ZONE_INFORMATION tz;
+        DWORD rc;
 
         strcpy(buf, pattern);
         found = buf + (found - pattern);
 
-        if (GetTimeZoneInformation(&tz) != TIME_ZONE_ID_INVALID) {
+        rc = GetTimeZoneInformation(&tz);
+        if (rc != TIME_ZONE_ID_INVALID) {
+            if (rc == TIME_ZONE_ID_STANDARD) {
+                tz.Bias += tz.StandardBias;
+            } else if (rc == TIME_ZONE_ID_DAYLIGHT) {
+                tz.Bias += tz.DaylightBias;
+            }
             tz.Bias *= -1;
             snprintf(found, strlen(JK_WINDOWS_TIMEZONE_PLACEHOLDER), 
"%c%02d%02d",
                      (tz.Bias >= 0 ? '+' : '-'), tz.Bias / 60, tz.Bias % 60);



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to