Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ab6b5c77f088447a317db0b165df3121ec8873a9
Ticket: 219026ffffffffffffffffffffffffffffffffff
Daylight Savings Time goof
User & Date: nobody on 2000-10-26 01:09:36
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 4022 Bug
    Version: 8.3b1
    SubmitDate: '2000-01-14'
    LastModified: '2000-01-14'
    Severity: MED
    Status: Released
    Submitter: techsupp
    ChangedBy: ericm
    OS: All
    FixedDate: '2000-01-14'
    FixedInVersion: 8.3b2
    ClosedDate: '2000-10-25'
    
    
    Name:
    
    Don Porter
    
    
    
    CVS:
    
    $Id: clock.test,v 1.8 2000/01/13 00:12:33 ericm Exp $
    
    
    
    Comments:
    
    This bug report is really for Tcl 8.3b2.  The bug form
    
    needs updating.
    
    
    
    The tests for the new handling of a relative
    
    [clock scan] which crosses a Daylight Savings Time boundary
    
    are "hard coded" to the PST time zone.  In PST, they test
    
    relative scans between 1999 Oct 31 00:00:00 PST and
    
    1999 Nov 1 00:00:00 PST, which in fact straddle a DST boundary.
    
    
    
    In EST, those times are 1999 Oct 31 02:00:00 and
    
    1999 Nov 1 03:00:00, which do not straddle a DST boundary.
    
    
    
    The patch changes the tests so they work relative to
    
    the local time zone.  I think they'll work anywhere now.
    
    I'm curious whether the revised tests will work properly
    
    in jurisdictions like Indiana or Arizona which do not
    
    observe DST.  A test there would be appreciated.
    
    
    
    ObservedBehavior:
    
    $ make test
    
    ==== clock-4.25 clock scan, DST for days FAILED
    
    ==== Contents of test case:
    
    
    
        clock scan "tomorrow" -base 941353200
    
    
    
    ---- Result was:
    
    941439600
    
    ---- Result should have been:
    
    941443200
    
    ==== clock-4.25 FAILED
    
    
    
    
    
    ==== clock-4.26 clock scan, DST for days FAILED
    
    ==== Contents of test case:
    
    
    
        clock scan "yesterday" -base 941443200
    
    
    
    ---- Result was:
    
    941356800
    
    ---- Result should have been:
    
    941353200
    
    ==== clock-4.26 FAILED
    
    
    
    DesiredBehavior:
    
    No test suite failures.
    
    
    
    Patch:
    
    Index: clock.test
    
    ===================================================================
    
    RCS file: /cvsroot/tcl/tests/clock.test,v
    
    retrieving revision 1.8
    
    diff -c -r1.8 clock.test
    
    *** clock.test  2000/01/13 00:12:33     1.8
    
    --- clock.test  2000/01/14 17:19:50
    
    ***************
    
    *** 221,231 ****
    
                -format {%b %d, %Y %H:%M:%S} -gmt true
    
      } "Dec 31, 1999 08:00:30"
    
      test clock-4.25 {clock scan, DST for days} {
    
    !     clock scan "tomorrow" -base 941353200
    
    ! } 941443200
    
      test clock-4.26 {clock scan, DST for days} {
    
    !     clock scan "yesterday" -base 941443200
    
    ! } 941353200
    
      test clock-4.27 {clock scan, day} knownBug {
    
          clock format [clock scan "Monday" -gmt true -base 946627200] \
    
                -format {%b %d, %Y %H:%M:%S} -gmt true
    
    --- 221,233 ----
    
                -format {%b %d, %Y %H:%M:%S} -gmt true
    
      } "Dec 31, 1999 08:00:30"
    
      test clock-4.25 {clock scan, DST for days} {
    
    !     clock format [clock scan tomorrow \
    
    !           -base [clock scan "1999-10-31 00:00:00"]] -format %H
    
    ! } 00
    
      test clock-4.26 {clock scan, DST for days} {
    
    !     clock format [clock scan yesterday \
    
    !           -base [clock scan "1999-11-01 00:00:00"]] -format %H
    
    ! } 00
    
      test clock-4.27 {clock scan, day} knownBug {
    
          clock format [clock scan "Monday" -gmt true -base 946627200] \
    
                -format {%b %d, %Y %H:%M:%S} -gmt true
    
    
    
    PatchFiles:
    
    tests/clock.test
    
    
    
    
    
    Yes, the tests were hardcoded for PST.  I applied your patch, with minor modification (I dropped the -format %H and made the expected result [clock scan "19991101 00:00:00"] to be sure we were getting the correct numbers).
    
    - eric
    
    -- 01/14/2000 ericm
    
    
    
  4. foundin changed to: "obsolete: 8.3b1"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "48. Number Handling"
  10. title changed to: "Daylight Savings Time goof"
  11. type changed to: "Bug"