Time conversions from EST with daylight saving to GMT

  • Thread starter Thread starter Phil Johnson
  • Start date Start date
P

Phil Johnson

Hi,

I have a web application that will be hosted on servers with timezones
configured to EST with daylight saving.

My application takes an XML datafeed that contains times in GMT (also with
daylight saving that will change on different dates to EST)

Is there any way within the .net framework to convert the current time from
the server (which will be EST with daylight saving) to GMT?

If not in the .net framework, is there any other way to do it? I'm
considering having a configuration setting that the site owner can log on to
the site and change the time difference, but would prefer to have an
automated solution.

--
Regards,

Phillip Johnson (MCSD For .NET)
PJ Software Development
www.pjsoftwaredevelopment.com
 
It is an easy offset. This time of year, it is 5 hours off. During the
summer, you move ahead one hour, which makes it four hours.

There are some methods on the DateTime structure you should look at:

ToLocalTime() - This is probably the most useful for you
http://msdn2.microsoft.com/en-us/library/system.datetime.tolocaltime.aspx

ToUniversalTime() - opposite direction
http://msdn2.microsoft.com/en-us/library/system.datetime.tolocaltime.aspx

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
 
Back
Top