How do I convert a date and time from a known time zone abbreviation to the timezone of a Browser client's timezone
Posted on 2014-07-28
I know how to get the time zone of a webserver. I just use C# in the code behind.
I have a date time value stored in a database in the same time zone as the webserver and I have code in the program I'm working with to extract that date.
How do I get from the web server date and time of
July 28, 2014 01:30 PM CST to July 28, 2014 02:30 PM EST which represents the web user's Date, Time and Time Zone abbreviation.
Keep in mind the user can be anywhere. The GMT -0400 for EDT and the GMT -0500 for CDT I see when displaying the date indicates I need to convert the Date Time portion by one hour.
I probably need to concatenate the adjusted client browser time with the appropriate client browser Time Zone Abbreviation.
Is there a way to do this (Date math) without reverting to string manipulation until the last step when I add the Time Zone abbreviation?