I'm working on a dialog base application, dealing with the time zone details.
In the dialog box there is a text box to enter the time offset. Then user click the display button, on the next text box display the timezone name. If the given time offset have more than one timezone name, very first timezone name should be display.
That's my question.
I'm going to use Windows API for this. So that I want to read the timezone list. How can I do that using API with GetTimeZoneInformation()
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
As I've mentioned to you multiple times.. there is no such thing as a "Timezone List". The timezones aren't stored on the computer anywhere (that is.. you can't use some magical API to list the timezones for you). Its just as useless as having an API that prints the numbers 0-100 for you on screen.. useless.
GetTimeZoneInformation, gets the offset for you.. thats it. You have to pre-program the timezone names, and offsets into your program. Then, use GetTimeZoneInformation to determine what the offset is, and have the default selection correspond to that.
Say I have a time offset, as a example +6:00, and I want to find the time zone name. That mean I have to read the list in the registry. So how can I do that.
Here is the list I'm talking about.
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha