Click here to Skip to main content
15,881,424 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I was given the TzID (Olson tzid format Exp: "Europe/Copenhagen"). After that, i tried to do the timezone conversion for certain DateTime from that timezone (different with server local time zone) to UTC by using c# TimeZonInfo class.

I was wondering why window's timezone id only have about 100 whereas the timezone id for Olson tz database have about 405 tz id. Lets say for time zone "Europe/Copenhagen", i have no idea how to use the FindSystemTimeZonebyID to get the time zone info for this time zone (It was listed in metazones in the Olson ID to windows ID convertion table). Anyone experienced in this? Please help me.

http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/zone_tzid.html[^]
http://en.wikipedia.org/wiki/List_of_tz_database_time_zones[^]
Posted
Updated 27-Jan-11 23:21pm
v2

You can see this links
Click
Click
Click
 
Share this answer
 
Comments
darrell987 28-Jan-11 8:34am    
Thanks for the reply. I know how to use FindSystemTimeZonebyID to convert local time to UTC and also converting DateTime from one time zone to another. I was just unclear of how to retrieve the time zone information for certain timezone like "Europe/Copenhagen" who have the corresponding Windows Timezone ID of "Europe_Central" which cannot be found in the "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Time Zones". Thanks again for your help.
At the end, i gave up with the class "timezoneinfo" method and just using the Olson database. There's a nice tool to access and calling the Olson database in .Net.

http://www.codeproject.com/KB/locale/zoneinfo_dotnet_api.aspx
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900