Until recently what used to be a headache for most of us is finally put out of misery by MS after framework 3.5.Yes there is code to finally get the datetime based on a given timezone and back as even i stumbled upon it a few months back. For eg if you have concerned about the various timezones and their datetimes in US which has several as follows.
//Eastern Standard Time (GMT-05:00) Eastern Time (US & Canada)
//Central Standard Time (GMT-06:00) Central Time (US & Canada)
//Mountain Standard Time (GMT-07:00) Mountain Time (US & Canada)
//Pacific Standard Time (GMT-08:00) Pacific Time (US & Canada)
//Alaskan Standard Time (GMT-09:00) Alaska
//Hawaiian Standard Time (GMT-10:00) Hawaii
//US Mountain Standard Time (GMT-07:00) Arizona
you can infact convert a DateTime to any other datetime in the world by passing in the timezone they are located in and then you can convert them to UTC or to local and vice versa.Lots of interesting stuff that we can really make our hands dirty.All thanks to the new TimezoneInfo class that has been introduced.You can even get the TimeZoneInfo.BaseUtcOffset of a given location and then find out the difference between that place and local time or UTC for that matter.You can even add datetime offset to the UTC date and get the datetime of a given place.
Let look at an easy example of how we achieve this.