Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003

    Unanswered: Daylight Savings

    Ok, maybe this is a dumb question, but, we're trying to assess the impact of the change in Daylight Savings. So I went back to 2am in April, 2006 to see how it affects a date calculation.

    I couldn't get it to show a difference:

    select to_number(to_date('04/02/2006 3','MM/DD/YYYY HH24') - to_date('04/02/2006 1','MM/DD/YYYY HH24')) *24*60*60 as DST,
    	   to_number(to_date('03/02/2006 3','MM/DD/YYYY HH24') - to_date('03/02/2006 1','MM/DD/YYYY HH24')) *24*60*60 as normal
    from dual;
           DST     NORMAL
    ---------- ----------
          7200       7200
    select to_timestamp_tz('04/02/2006 3','MM/DD/YYYY HH24') - to_timestamp_tz('04/02/2006 1','MM/DD/YYYY HH24')  as DST,
    	   to_timestamp_tz('03/02/2006 3','MM/DD/YYYY HH24') - to_timestamp_tz('03/02/2006 1','MM/DD/YYYY HH24')  as normal
    from dual;
    DST                           NORMAL
    ----------------------------- -------------------------------
    +000000000 02:00:00.000000000 +000000000 02:00:00.000000000
    Am I doing something wrong?


  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    This year for DBA in USA the switch to Daylight Savings Times happens on 11 March; less than 6 weeks away.
    Are you ready for this change?
    Answers can be found at MetaLink Note:402742.1
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Dec 2003
    I read that article, and there are only a few places where we deal with timestamps with timezones. I was wondering if the loss of an hour in some of our calculations would be a big deal. So I went back to the first Sunday in April last year (4/2/06) to see what happens when you try to assess the difference between two dates across that boundary. As in the example in my first post, I don't see the difference between that and just the date difference between another arbitrary set of dates.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts