Time conversions from EST with daylight saving to GMT

Time conversions from EST with daylight saving to GMT

am 29.01.2008 19:13:16 von PhilJohnson

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

Re: Time conversions from EST with daylight saving to GMT

am 29.01.2008 19:55:42 von NoSpamMgbworld

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.tol ocaltime.aspx

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

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

*************************************************
| Think outside the box!
|
*************************************************
"Phil Johnson" wrote in message
news:B0111DA6-3F2E-4DD1-915C-0CF682DA7E62@microsoft.com...
> 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

Re: Time conversions from EST with daylight saving to GMT

am 29.01.2008 20:32:24 von PhilJohnson

Thanks George,

Looks ideal, I will give it a go.

--
Regards,

Phillip Johnson (MCSD For .NET)
PJ Software Development
www.pjsoftwaredevelopment.com


"Cowboy (Gregory A. Beamer)" wrote:

> 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.tol ocaltime.aspx
>
> ToUniversalTime() - opposite direction
> http://msdn2.microsoft.com/en-us/library/system.datetime.tol ocaltime.aspx
>
> --
> Gregory A. Beamer
> MVP, MCP: +I, SE, SD, DBA
>
> *************************************************
> | Think outside the box!
> |
> *************************************************
> "Phil Johnson" wrote in message
> news:B0111DA6-3F2E-4DD1-915C-0CF682DA7E62@microsoft.com...
> > 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
>
>
>