Menu

#3333 clock scan [clock format [clock seconds] -gmt 1]

obsolete: 8.5a4
open
5
2005-12-21
2005-12-20
Anonymous
No

clock scan [clock format [clock seconds] -gmt 1]

fails with:

unable to convert date-time string "Tue Dec 20 17:41:41
+0000 2005"
while evaluating {clock scan [clock format [clock
seconds] -gmt 1]}

The default format has changed from 8.4 to current CVS.

tclsh8.4 [~]clock format [clock seconds]
Tue Dec 20 01:00:34 PM EST 2005

tclsh8.5 [~]clock format [clock seconds]
Tue Dec 20 13:02:10 -0500 2005

Not sure if this was desired, but a trivial patch
(attached) restores the old behaviour.

Discussion

  • Nobody/Anonymous

    tcl clock patch

     
  • Chris Maj

    Chris Maj - 2005-12-20

    Logged In: YES
    user_id=191458

    But maybe [clock scan] should be able to handle more formats ?

     
  • Donal K. Fellows

    • labels: 105657 --> 06. Time Measurement
    • milestone: --> obsolete: 8.5a4
    • assigned_to: dkf --> kennykb
     
  • Kevin B KENNY

    Kevin B KENNY - 2006-07-31

    Logged In: YES
    user_id=99768

    In the 8.5 HEAD, I've put [clock format] back to using
    the timezone name rather than the value. We really, really
    need to make positive as well as negative timezones work
    in free-form [clock scan] - but that's a tremendous
    amount of work. There are simply too many ambiguities for
    the YACC parser to do The Right Thing. I'm leaving this
    open because I have some other ideas (short of resorting
    to fixed-format [clock scan]) for fixing this in 8.5.