By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,914 Members | 1,706 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,914 IT Pros & Developers. It's quick & easy.

Time conversions from EST with daylight saving to GMT

P: n/a
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
Jan 29 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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/lib...localtime.aspx

ToUniversalTime() - opposite direction
http://msdn2.microsoft.com/en-us/lib...localtime.aspx

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

*************************************************
| Think outside the box!
|
*************************************************
"Phil Johnson" <Ph*********@discussions.microsoft.comwrote in message
news:B0**********************************@microsof t.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

Jan 29 '08 #2

P: n/a
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/lib...localtime.aspx

ToUniversalTime() - opposite direction
http://msdn2.microsoft.com/en-us/lib...localtime.aspx

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

*************************************************
| Think outside the box!
|
*************************************************
"Phil Johnson" <Ph*********@discussions.microsoft.comwrote in message
news:B0**********************************@microsof t.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


Jan 29 '08 #3

P: n/a
The link given above really got me started on the timezone conversion issue,
but I also had some hurdles to overcome when comparing javascript utc
datetime from the client to the .NET utc date time on the server.

Here is how I got around the issues....

http://pjsoftwaredeveloper.blogspot....o-clients.html

--
Regards,

Phillip Johnson (MCSD For .NET)
PJ Software Development
www.pjsoftwaredevelopment.com
"Phil Johnson" wrote:
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/lib...localtime.aspx

ToUniversalTime() - opposite direction
http://msdn2.microsoft.com/en-us/lib...localtime.aspx

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

*************************************************
| Think outside the box!
|
*************************************************
"Phil Johnson" <Ph*********@discussions.microsoft.comwrote in message
news:B0**********************************@microsof t.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
Feb 4 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.