#2616 clock scan returns wrong day in gmt

obsolete: 8.4.2
closed-fixed
5
2004-08-19
2004-03-10
No

clock scan with gmt fails to return the proper day until
your time zone changes to the next day.

Ex.

I am in CST and if I run a [clock scan "1600Z" ] or [clock
scan "1600Z" -gmt true] or [clock scan "1600" -gmt
true] during the actual time frame of 00:00Z to 05:59Z,
it will return the previous day. It appears that the day
elements is not getting altered based on the GMT time
but by your own time zone instead. Included is a test
file that was run on the hour for several hours that
shows the problem.

Discussion

  • Jeremy Gibson

    Jeremy Gibson - 2004-03-10

    Example of problem

     
  • Jeremy Gibson

    Jeremy Gibson - 2004-03-10

    Logged In: YES
    user_id=963204

    Hit submit too soon. What I am expecting is that clock scan
    would return the proper seconds for the gmt day because I
    am running a GMT based scheduler that would kick off all of
    events at the beginning of the GMT day no matter the actual
    scheduled time b/c of this problem.

     
  • Kevin B KENNY

    Kevin B KENNY - 2004-03-10

    Logged In: YES
    user_id=99768

    Problem verified on Win2k. Thanks for reporting
    the bug clearly enough to allow it to be
    reproduced.

    A workaround is to supply a date explicitly to the
    [clock scan].

    The attached script, "workaround.tcl" shows a
    minimal exampleof the problem and how to work
    around it.

     
  • Kevin B KENNY

    Kevin B KENNY - 2004-03-10

    workaround.tcl

     
  • Kevin B KENNY

    Kevin B KENNY - 2004-03-10

    Logged In: YES
    user_id=99768

    (Partial) fix committed to the HEAD; [clock scan 1600 -gmt true]
    will now return the correct date in any time zone. The full fix
    (where an explicit time zone is specified) is incompatible with
    the current parser (base time is broken into fields before the
    time zone is parsed); for this reason [clock scan 1600Z] will
    still fail.

     
  • Kevin B KENNY

    Kevin B KENNY - 2004-03-10
    • status: open --> closed
     
  • Kevin B KENNY

    Kevin B KENNY - 2004-05-18
    • status: closed --> open
     
  • Kevin B KENNY

    Kevin B KENNY - 2004-08-19

    Logged In: YES
    user_id=99768

    Full fix implemented in 8.5

     
  • Kevin B KENNY

    Kevin B KENNY - 2004-08-19
    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks