Time zones dilemma

Posted on 2003-02-27
Medium Priority
Last Modified: 2010-08-05
I am doing an application in which the time zones (TZ) will have to be translated from local language (English) to French, Spanish...and so on. In order to have a list of TZ, I accessed the registry to gather all specific time zone informations in this REG key (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Time Zones).  

Since this information is recorded in the language of my Windows version (English TZ info for English version...), I have gather the full list of TZ in English from the registry and have translated them in all other required language.  Now I am trying to find a way create a relationship between all these translated TZ.

(GMT-05:00) Eastern Time (US & Canada) in english is translated to (GMT-05:00) Est (USA et Canada) in French.

In my application, I don't want to refer to a string like these ones but I would like to refer to some invariable values from wich I could link all time zones.

By browsing the registry, I have found, I think, an other key from which I could build this relationship but I am not sure.  The key is MapID. These keys are composed with two numbers separeted with a coma like (38,39).  They seems to be unique (exept for (GMT+/-12:00)) but I don't understand the meaning of these numbers and are they the same on all Windows version (language and build: 95 to XP).

So the questions are:

Could somebody explain what is the relationship between these numbers and the TZ?
Is this approach is the good one to uniquely identify all time zones on all version of Windows?
Could the information recorded in the time zone registry key (bias, daylight saving time...) could be change in the future for some political or geographical reason or are these time zone informations are fixed and "eternal".

Thank you.

Francois Leduc
Question by:Fled
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

ginsonic earned 400 total points
ID: 8033880
LVL 22

Assisted Solution

by:Mohammed Nasman
Mohammed Nasman earned 400 total points
ID: 8034860

  Look at Win 32 SDK reference that comes with Delphi, and look at these APIs: GetTimeFormat, SetTimeZoneInformation, GetTimeZoneInformation and TTimeZoneInformation type, mabye that will help you

  I haven't tried them before

Expert Comment

ID: 8042439
Maybe these values are latitude and longitude ? Very stupid idea, though...

Expert Comment

ID: 9188985
Fled - did you get anywhere with this? I'm developing a VC++ application using Time Zone stuff and have come across a problem between NT 4 and 2000. Windows 2000 has an Index item in the registry entry to identify the time zone (rather than relying on the string representation), but NT doesn't. To make matters worse NT and 2000 don't have the same string representations for the same time zone!!

From what I can see Map IDs are not unique across the time zones and for those who MapIDs are the same the Time Zone Information (TZI - which includes the daylight savings information etc) differs.

Have you managed to uniquely ID the TZ on NT? (except from using the TZ name?)

LVL 10

Expert Comment

ID: 9981755
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
       to split points between ginsonic and mnasman
Please leave any comments here within the next seven days.


Merry Christmas and happy new year!

EE Cleanup Volunteer

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month13 days, 11 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question