I was trying to find out how to grab the current timezone settings from the Windows registry, so I searched on the Internet, and eventually found where it was stored
(HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation)
, but most sites that showed the data structure were wrong. Only with one thing, that was which 16 bit integer represented the day of the week. Most sites said it was the 3rd Integer, but actually, it is the 8th (or last) Integer in the keys "StandardStart" and "DaylightStart". Eventually I found a site that said the right thing, so I'm going to list it here anyway.
Path: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TimeZoneInformation Keys: StandardStart and DaylightStart All integers are two byte big endian | |
Integer Index | Represents |
0 | Year: 0 = 1900 |
1 | Month: 1 = January ... 12 = December |
2 | Week: 1 = First week ... 5 = Last Week |
3 | Hour: 0 = Midnight, 23 = 11pm |
4 | Minute: 0 - 59 |
5 | Second: 0 - 59 |
6 | Millisecond: 0 - 999 |
7 | Day of week: 0 = Sunday ... 6 = Saturday |
So, there you have it.
No comments:
Post a Comment