Yep...your right Rich...was just looking to see how others handled the 
issue of the same hour executing twice.



Message from Rich Armstrong <[EMAIL PROTECTED]>@DISCUSS.DEVELOP.COM received 
on 01/12/2006 10:59 AM

01/12/2006 10:59 AM



Rich Armstrong <[EMAIL PROTECTED]>@DISCUSS.DEVELOP.COM

Please respond to "Discussion of advanced .NET topics." 
<ADVANCED-DOTNET@DISCUSS.DEVELOP.COM>
Sent by "Discussion of advanced .NET topics." 
<ADVANCED-DOTNET@DISCUSS.DEVELOP.COM>



        To:     ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
        cc: 
        Subject:        Re: [ADVANCED-DOTNET] The hour that ticks twice

Oops. That should read

.. there's no way to say whether "Oct 29, 2006 1:30 AM Central Time" 
represents DST or standard time.

--Rich Armstrong

-----Original Message-----
From: Discussion of advanced .NET topics. 
[mailto:[EMAIL PROTECTED] On Behalf Of Rich Armstrong
Sent: Thursday, January 12, 2006 10:51 AM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: Re: [ADVANCED-DOTNET] The hour that ticks twice

On rereading the original post, I believe that Mr. Gray was wondering 
about how to handle the ambiguity of the local time values
that represent the last hour of Daylight Saving Time _and_ the first hour 
of Standard time, not how to handle leap seconds. In North
America, these are times from 1:00 AM to 1:59.xx AM (on October 29 in 
2006). For example, there's no way to say whether "Oct 30,
2006 1:30 AM Central Time" represents DST or standard time. [European 
countries switch from "summer" time (DST) at 01:00 UTC, so
it's a different hour of ambiguous times in different countries, but the 
problem's the same.]

IIRC, System.TimeZone will treat those ambiguous times as standard time 
when converting to UTC. If your application has to deal with
such times, your customer simply has to understand (or specify) how the 
values are treated. We derived our own TimeZone class to
deal with such issues.

-----Original Message-----
From: Discussion of advanced .NET topics. 
[mailto:[EMAIL PROTECTED] On Behalf Of Peter Ritchie
Sent: Thursday, January 12, 2006 9:47 AM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: Re: [ADVANCED-DOTNET] The hour that ticks twice

Sounds like you're talking about a strictly North American customer base?
Not all localities are going to support leap seconds and not all
localities have a concept of daylight savings time.

Even if you are talking about only a North American customer, I would
suggest using Globalization to get the information about when daylight
savings occurs.  This doesn't change often; but it has changed over the
years.  Leap seconds is a fairly new concept; we may find this may evolve
frequently in the near future.

I think to directly answer your question, though, most people will
answer "depends on what the customer wants".  Are you keeping track of
duration of time and the daylight savings state during that duration, or
the exact time?  Any exact time will either be standard time or not;
regardless of whether there is a leap second.

I assume you're trying to keep track of when a particular action
occurred.  Keep in mind the leap second is a human concept, that period of
time does not exist in relation to the metrics we use to define points in
time.  With a leap second, the duration of 01:59.59 to 01:00:00 is two
seconds.  If you want to keep track of start and end times rather than the
exact duration, you'll have to know when leaps seconds occur and present
the correct duration to the user--only if the customer believes that is
important.

On Wed, 11 Jan 2006 16:21:59 -0600, Franklin Gray
<[EMAIL PROTECTED]> wrote:

>Just curious what people have done in the past when the user selects a
>date and time that falls in that strange hour that ticks twice each year
>(daylight savings time where it goes from 01:59.59 to 01:00:00).  Do you
>prompt the user as to which it is, daylight savings or standard?  If so,
>how does the program know without having to create a seperate field for
>each date in the DB structure?  I know converting all dates to GMT would
>solve this problem but they don't want to do that here.

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com



===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to