How can I obtain the time in another UTC location, or at least what UTC time value is set in the computer so I can increase/decrease the current time and obtain what I want?
My specific problem is:
I’m in a specific location, and I want to know what time is in UK.
I finally found the answer. This article explains
TimeZoneInfoandTimeZonevery well, and it has some examples of converting between times of different timezones.All you need to know is the ID of the Time Zone you want to convert to.
An example (taken from the site):
prints
Now: 3/5/2011 6:30:48 PM -08:00Now in Hawaii: 3/5/2011 4:30:48 PM -10:00To obtain a list of all the IDs, you can:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time ZonesTimeZoneInfo.GetSystemTimeZones();