Need Week instead of Day for TZ transistion
authorgrpomega <gerald@palmerhouse.net>
Thu, 6 Mar 2014 16:04:53 +0000 (10:04 -0600)
committergrpomega <gerald@palmerhouse.net>
Thu, 6 Mar 2014 16:04:53 +0000 (10:04 -0600)
transistion.Day is being pulled and assigned to the DST transition times instead of the week of transition.  This gives the wrong date for DST implementation.
Pull request #1713 can be killed if libfreerdp/locale/timezone.c can be regenerated form the file resulting from the execution of this script.

All implementations of DST appear to be calculated rather than specific.
http://www.webexhibits.org/daylightsaving/g.html
so transistion.Day should never be relevant.

scripts/TimeZones.cs

index d8b0d9e..80a1550 100644 (file)
@@ -141,7 +141,7 @@ namespace TimeZones
                     tzr.StandardDate.wYear = (UInt16)0;\r
                     tzr.StandardDate.wMonth = (UInt16)transition.Month;\r
                     tzr.StandardDate.wDayOfWeek = (UInt16)transition.DayOfWeek;\r
-                    tzr.StandardDate.wDay = (UInt16)transition.Day;\r
+                    tzr.StandardDate.wDay = (UInt16)transition.Week;\r
                     tzr.StandardDate.wHour = (UInt16)time.Hour;\r
                     tzr.StandardDate.wMinute = (UInt16)time.Minute;\r
                     tzr.StandardDate.wSecond = (UInt16)time.Second;\r
@@ -153,7 +153,7 @@ namespace TimeZones
                     tzr.DaylightDate.wYear = (UInt16)0;\r
                     tzr.DaylightDate.wMonth = (UInt16)transition.Month;\r
                     tzr.DaylightDate.wDayOfWeek = (UInt16)transition.DayOfWeek;\r
-                    tzr.DaylightDate.wDay = (UInt16)transition.Day;\r
+                    tzr.DaylightDate.wDay = (UInt16)transition.Week;\r
                     tzr.DaylightDate.wHour = (UInt16)time.Hour;\r
                     tzr.DaylightDate.wMinute = (UInt16)time.Minute;\r
                     tzr.DaylightDate.wSecond = (UInt16)time.Second;\r