Time conversions from EST with daylight saving to GMT

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
 
C

Cowboy \(Gregory A. Beamer\)

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!
|
*************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top