Click here to Skip to main content
15,899,474 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: App argument :o) Pin
Joaquín M López Muñoz15-Apr-03 5:33
Joaquín M López Muñoz15-Apr-03 5:33 
GeneralRe: App argument :o) Pin
Jim Crafton15-Apr-03 7:53
Jim Crafton15-Apr-03 7:53 
GeneralMessage Trapping Pin
BtySgtMajor15-Apr-03 4:41
BtySgtMajor15-Apr-03 4:41 
GeneralRe: Message Trapping Pin
G. Steudtel15-Apr-03 5:27
G. Steudtel15-Apr-03 5:27 
GeneralRe: Message Trapping Pin
BtySgtMajor15-Apr-03 5:41
BtySgtMajor15-Apr-03 5:41 
GeneralTime Zone Pin
Mazdak15-Apr-03 4:16
Mazdak15-Apr-03 4:16 
GeneralRe: Time Zone Pin
David Crow15-Apr-03 4:31
David Crow15-Apr-03 4:31 
GeneralRe: Time Zone Pin
peterchen15-Apr-03 4:58
peterchen15-Apr-03 4:58 
I explored this recently, and basically gave up (it was only a pet project, and I wanted to do .NET UI, not registry mangling and raw byte juggling.

There is no API way to enumerate Time Zone Information (neither Win32, nor .NET)
Time zone information is stored in a very strange format in the registry, under

HKLM\Software\Microsoft\Windows NT\CurrentVersion\Time Zones\

The format is explained in a Knowledge Base article ( Q115231, search for TIME_ZONE_INFORMATION)

You basically have there:
- Name strings
- an Index (probaly for the correct sort order, since the registry has none by itself)
- a "MapID", which is probably used to shift the world map in the "select time zone dialog while windows setup
- a TZI binary structure with the actual time shift and DST switch information
(it basically indicates month, weekday and time of the switch, and which week of the month, using 5==last. very weird indeed)

You could use this information to re-build a TIME_ZONE_INFORMATION structure, then use SystemTimeToTzSpecificLocalTime (however, this works only on NT-based systems). Or you do the claculation yourself (grccch....)

Anyway, if you work your way through it, it would be nice if you can post an article I could blatantly rip off Wink | ;)

peter





"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS

sighist | Agile Programming | doxygen

GeneralRe: Time Zone Pin
JT Anderson15-Apr-03 5:00
JT Anderson15-Apr-03 5:00 
GeneralHowto get CPU load Pin
Bluescreen200315-Apr-03 3:35
Bluescreen200315-Apr-03 3:35 
GeneralRe: Howto get CPU load Pin
Chris Richardson15-Apr-03 8:20
Chris Richardson15-Apr-03 8:20 
Generalowner of a file Pin
naradaji15-Apr-03 3:34
naradaji15-Apr-03 3:34 
GeneralRe: owner of a file Pin
David Crow15-Apr-03 4:36
David Crow15-Apr-03 4:36 
GeneralRe: owner of a file Pin
naradaji15-Apr-03 4:46
naradaji15-Apr-03 4:46 
GeneralQuestion about istringstream.getline method. Pin
George215-Apr-03 2:50
George215-Apr-03 2:50 
GeneralRe: Question about istringstream.getline method. Pin
valikac15-Apr-03 6:50
valikac15-Apr-03 6:50 
GeneralRe: Question about istringstream.getline method. Pin
George215-Apr-03 16:04
George215-Apr-03 16:04 
GeneralOnInitialUpdate and CFormView problems Pin
Ceri15-Apr-03 2:39
Ceri15-Apr-03 2:39 
QuestionChange Parent? Pin
catchnine15-Apr-03 2:06
catchnine15-Apr-03 2:06 
GeneralGetting function declarations out of a .lib Pin
John Oliver15-Apr-03 1:46
John Oliver15-Apr-03 1:46 
GeneralRe: Getting function declarations out of a .lib Pin
Roger Allen15-Apr-03 1:53
Roger Allen15-Apr-03 1:53 
GeneralRe: Getting function declarations out of a .lib Pin
Mike Dimmick15-Apr-03 2:45
Mike Dimmick15-Apr-03 2:45 
GeneralRe: Getting function declarations out of a .lib Pin
John Oliver15-Apr-03 3:54
John Oliver15-Apr-03 3:54 
GeneralDefault browser Pin
Jump_Around15-Apr-03 1:23
Jump_Around15-Apr-03 1:23 
GeneralRe: Default browser Pin
Joaquín M López Muñoz15-Apr-03 2:31
Joaquín M López Muñoz15-Apr-03 2:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.