Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 930
  • Last Modified:

timezone

I need to convert time between different timezone, from some server time to some other local time.

I already know fromServerTime and toLocalZoneName

When I use
TimeZoneInfo toLocalZone = TImeZoneInfo.FindSystemTimeZoneByID(toLocalZoneName)

I got TimeZoneNotFoundExceptionsaying that "The time zone ID 'Chile Standard Time' was not found on local computer."

'Chile Standard Time'  is a valid time zone Name, why it was found? Is there any prior setting for it? My machine is a standard one.

Thanks.
0
minglelinch
Asked:
minglelinch
  • 4
1 Solution
 
Brad GrouxSenior Manager (Wintel Engineering)Commented:
Check out TZUTIL to view a full list of available time zones.

From a command line or PowerShell window navigate to C:\Windows\System32 and run tzutil /l for a full list of supported time zones. I believe that CLT is on the same schedule as US EST - although daylight saving may not be in line.

If you'll notice, Chile Standard Time is not listed - so you'll need to utilize another time zone that is in the same time.

PS C:\windows\system32> tzutil.exe /l
(UTC-12:00) International Date Line West
Dateline Standard Time

(UTC-11:00) Coordinated Universal Time-11
UTC-11

(UTC-10:00) Hawaii
Hawaiian Standard Time

(UTC-09:00) Alaska
Alaskan Standard Time

(UTC-08:00) Baja California
Pacific Standard Time (Mexico)

(UTC-08:00) Pacific Time (US & Canada)
Pacific Standard Time

(UTC-07:00) Arizona
US Mountain Standard Time

(UTC-07:00) Chihuahua, La Paz, Mazatlan
Mountain Standard Time (Mexico)

(UTC-07:00) Mountain Time (US & Canada)
Mountain Standard Time

(UTC-06:00) Central America
Central America Standard Time

(UTC-06:00) Central Time (US & Canada)
Central Standard Time

(UTC-06:00) Guadalajara, Mexico City, Monterrey
Central Standard Time (Mexico)

(UTC-06:00) Saskatchewan
Canada Central Standard Time

(UTC-05:00) Bogota, Lima, Quito
SA Pacific Standard Time

(UTC-05:00) Eastern Time (US & Canada)
Eastern Standard Time

(UTC-05:00) Indiana (East)
US Eastern Standard Time

(UTC-04:30) Caracas
Venezuela Standard Time

(UTC-04:00) Asuncion
Paraguay Standard Time

(UTC-04:00) Atlantic Time (Canada)
Atlantic Standard Time

(UTC-04:00) Cuiaba
Central Brazilian Standard Time

(UTC-04:00) Georgetown, La Paz, Manaus, San Juan
SA Western Standard Time

(UTC-04:00) Santiago
Pacific SA Standard Time

(UTC-03:30) Newfoundland
Newfoundland Standard Time

(UTC-03:00) Brasilia
E. South America Standard Time

(UTC-03:00) Buenos Aires
Argentina Standard Time

(UTC-03:00) Cayenne, Fortaleza
SA Eastern Standard Time

(UTC-03:00) Greenland
Greenland Standard Time

(UTC-03:00) Montevideo
Montevideo Standard Time

(UTC-03:00) Salvador
Bahia Standard Time

(UTC-02:00) Coordinated Universal Time-02
UTC-02

(UTC-01:00) Azores
Azores Standard Time

(UTC-01:00) Cape Verde Is.
Cape Verde Standard Time

(UTC) Casablanca
Morocco Standard Time

(UTC) Coordinated Universal Time
UTC

(UTC) Dublin, Edinburgh, Lisbon, London
GMT Standard Time

(UTC) Monrovia, Reykjavik
Greenwich Standard Time

(UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
W. Europe Standard Time

(UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague
Central Europe Standard Time

(UTC+01:00) Brussels, Copenhagen, Madrid, Paris
Romance Standard Time

(UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb
Central European Standard Time

(UTC+01:00) West Central Africa
W. Central Africa Standard Time

(UTC+01:00) Windhoek
Namibia Standard Time

(UTC+02:00) Athens, Bucharest
GTB Standard Time

(UTC+02:00) Beirut
Middle East Standard Time

(UTC+02:00) Cairo
Egypt Standard Time

(UTC+02:00) Damascus
Syria Standard Time

(UTC+02:00) E. Europe
E. Europe Standard Time

(UTC+02:00) Harare, Pretoria
South Africa Standard Time

(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius
FLE Standard Time

(UTC+02:00) Istanbul
Turkey Standard Time

(UTC+02:00) Jerusalem
Israel Standard Time

(UTC+02:00) Quantlab 20 Hour
Quantlab 20 Hour Time

(UTC+02:00) Tripoli
Libya Standard Time

(UTC+03:00) Amman
Jordan Standard Time

(UTC+03:00) Baghdad
Arabic Standard Time

(UTC+03:00) Kaliningrad, Minsk
Kaliningrad Standard Time

(UTC+03:00) Kuwait, Riyadh
Arab Standard Time

(UTC+03:00) Nairobi
E. Africa Standard Time

(UTC+03:30) Tehran
Iran Standard Time

(UTC+04:00) Abu Dhabi, Muscat
Arabian Standard Time

(UTC+04:00) Baku
Azerbaijan Standard Time

(UTC+04:00) Moscow, St. Petersburg, Volgograd
Russian Standard Time

(UTC+04:00) Port Louis
Mauritius Standard Time

(UTC+04:00) Tbilisi
Georgian Standard Time

(UTC+04:00) Yerevan
Caucasus Standard Time

(UTC+04:30) Kabul
Afghanistan Standard Time

(UTC+05:00) Ashgabat, Tashkent
West Asia Standard Time

(UTC+05:00) Islamabad, Karachi
Pakistan Standard Time

(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi
India Standard Time

(UTC+05:30) Sri Jayawardenepura
Sri Lanka Standard Time

(UTC+05:45) Kathmandu
Nepal Standard Time

(UTC+06:00) Astana
Central Asia Standard Time

(UTC+06:00) Dhaka
Bangladesh Standard Time

(UTC+06:00) Ekaterinburg
Ekaterinburg Standard Time

(UTC+06:30) Yangon (Rangoon)
Myanmar Standard Time

(UTC+07:00) Bangkok, Hanoi, Jakarta
SE Asia Standard Time

(UTC+07:00) Novosibirsk
N. Central Asia Standard Time

(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi
China Standard Time

(UTC+08:00) Krasnoyarsk
North Asia Standard Time

(UTC+08:00) Kuala Lumpur, Singapore
Singapore Standard Time

(UTC+08:00) Perth
W. Australia Standard Time

(UTC+08:00) Taipei
Taipei Standard Time

(UTC+08:00) Ulaanbaatar
Ulaanbaatar Standard Time

(UTC+09:00) Irkutsk
North Asia East Standard Time

(UTC+09:00) Osaka, Sapporo, Tokyo
Tokyo Standard Time

(UTC+09:00) Seoul
Korea Standard Time

(UTC+09:30) Adelaide
Cen. Australia Standard Time

(UTC+09:30) Darwin
AUS Central Standard Time

(UTC+10:00) Brisbane
E. Australia Standard Time

(UTC+10:00) Canberra, Melbourne, Sydney
AUS Eastern Standard Time

(UTC+10:00) Guam, Port Moresby
West Pacific Standard Time

(UTC+10:00) Hobart
Tasmania Standard Time

(UTC+10:00) Yakutsk
Yakutsk Standard Time

(UTC+11:00) Solomon Is., New Caledonia
Central Pacific Standard Time

(UTC+11:00) Vladivostok
Vladivostok Standard Time

(UTC+12:00) Auckland, Wellington
New Zealand Standard Time

(UTC+12:00) Coordinated Universal Time+12
UTC+12

(UTC+12:00) Fiji
Fiji Standard Time

(UTC+12:00) Magadan
Magadan Standard Time

(UTC+13:00) Nuku'alofa
Tonga Standard Time

(UTC+13:00) Samoa
Samoa Standard Time

PS C:\windows\system32>

Open in new window

0
 
minglelinchAuthor Commented:
Exactly you are right.  

"If you'll notice, Chile Standard Time is not listed - so you'll need to utilize another time zone that is in the same time."

But I'm working on time converting from a servertime to a destination local time using C#. How can I make it to support all zones? How can I make machine recogniztion Chile Standard Time? As anyother time zones like Europe, Asia, etc are all listed, while Chile Standard Time is not. Why is it and how to make it listed. I want to all of them avaiable.\

Appreciate further help.
0
 
minglelinchAuthor Commented:
Use Offset. Resolved. Thanks.
0
 
minglelinchAuthor Commented:
thanks.
0
 
minglelinchAuthor Commented:
My solution is still not what I want.

"so you'll need to utilize another time zone that is in the same time"

Brad Groux: How should I do so that I can  utilize another time zone that is in the same time?
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now