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 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
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
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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
|
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...
|
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...
|
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...
|
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...
| |
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...
|
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...
|
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 =...
|
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...
|
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,...
|
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...
| |
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...
|
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,...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |