Tcl Source Code

View Ticket
Login
Ticket UUID: 1386377
Title: clock scan [clock format [clock seconds] -gmt 1]
Type: Bug Version: obsolete: 8.5a4
Submitter: nobody Created on: 2005-12-20 18:05:52
Subsystem: 06. Time Measurement Assigned To: kennykb
Priority: 5 Medium Severity:
Status: Open Last Modified: 2006-07-31 10:36:51
Resolution: None Closed By:
    Closed on:
Description:
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.
User Comments: kennykb added on 2006-07-31 10:36:51:
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.

cmay added on 2005-12-21 01:15:40:
Logged In: YES 
user_id=191458

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

nobody added on 2005-12-21 01:05:52:

File Added - 160560: tcl_clock.patch.txt

Attachments: