.NET Framework Bookmark and Share   
 index > .NET Base Class Library > How to understand daylight saving time?
 

How to understand daylight saving time?

Hi,
I want to know whether any arbitrary place uses daylight saving time or not.
Suppose I do not know anything about the place other than its date and local time (which means I cannot able to pass the dates when daylight saving period begins and ends)


Is there any possibility to do that?
Thanks for your time...

Aleyna
It greatly depends on the location. Certain counties of Arizona and Indiana, for example, do not observe daylight savings time. Avoid the problem by handling all dates in UTC, converting to local time at the last possible moment (printing, screen display).
nobugz

There is no guaranteed way to be able to determine the time zone/DST given an arbitrary date and time (local or otherwise). Suppose you say that it is April 1, 2006 at 3:30 PM. If it is 3:30 PM in EST then it'll be 3:30 PM in PST in 4 hours. All time zones will eventually have the same dates and local times. DST is irrelevant at this point because during DST a day can actually have the same time occur two different times in the same day (fall for those of us in the US). You'll need more information before you will be able to determine the DST. Given the time zone you can determine DST for any date. I encourage you to check out http://www.michaelbrumm.com/simpletimezone.htmlfor working with time zones once you store enough information because the existing .NET classes only work with the current time zone.

Michael Taylor - 9/25/06

TaylorMichaelL
It greatly depends on the location. Certain counties of Arizona and Indiana, for example, do not observe daylight savings time. Avoid the problem by handling all dates in UTC, converting to local time at the last possible moment (printing, screen display).
nobugz

You can use google to search for other answers

Custom Search

More Threads

• How can I detect if a form is open?
• Using c# in Visual Web Developer
• Cryptic debugger message
• Issue with synclock of shared object
• Privileges in BCL
• .net Framework 2.0 manual configuarion
• Date Formatting with a DataList
• How to convert dll file to source code
• Question on using Convert.ToInt64() with .NET 1.1 and higher
• Specifing the time intraval in win service