473,503 Members | 1,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Time conversions from EST with daylight saving to GMT

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
3 2916
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
30127
by: Drew | last post by:
Is there a way to check if it is daylight savings or not via c#? I have heard you can use System.Globalization? Thanks - Drew
7
4067
by: Brett Edman | last post by:
I created a UTC clock using this: UTCTime = MyTime.ToUniversalTime() Now that we've turned the clocks ahead 1 hour for daylight savings time, the clock is reporting the wrong UTC time. It is...
6
8829
by: Robm | last post by:
Since googling this issue only brings up the April fool's problem, which was solved years ago, I hope that somebody can help me with this. I have a large vc++/mfc application which needs to know...
0
1494
by: Chirag Shukla | last post by:
Colleagues, I wanted to share a function to find if a date is in Daylight Saving Time or not. I was able to make this function faster than reading MSDN to find functions that .NET provides. I...
1
3205
by: maflatoun | last post by:
Hi everyone, I have 3 different time zones that I'm working with. Basically converting from UTC to those 3 time zones. Eastern Daylight Time (GMT -04:00, New York) Central Daylight Time (GMT...
1
4507
by: maflatoun | last post by:
Hi everyone, I have 3 different time zones that I'm working with. Basically converting from UTC to those 3 time zones. Eastern Daylight Time (GMT -04:00, New York) Central Daylight Time (GMT...
1
1980
by: luke_airig | last post by:
I'm not sure if this is the right group for this posting. If not, please accept my apologies. I have been tasked with identifying and correcting application code that will be affected by the...
1
14578
by: davelist | last post by:
I'm guessing there is an easy way to do this but I keep going around in circles in the documentation. I have a time stamp that looks like this (corresponding to UTC time): start_time =...
3
3955
by: bernhard Hoyler | last post by:
Hi, I would like to determine whether at a certain time point in time the daylight savings time is in effect. This means such a logic should show that today (16-Nov-2007) no daylight savings...
0
7201
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
6988
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7456
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3166
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3153
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1510
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
734
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
379
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.