clock scan [clock format [clock seconds] -gmt 1]
Closed / Fixed1386377fffffffffffffffffffffffffffffffffCreated 21 years agoUpdated 42 days ago
Descriptionplain2005-12-20 18:05:52
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.
nobodyplain2005-12-21 01:05:52
File Added - 160560: tcl_clock.patch.txt
cmayplain2005-12-21 01:15:40
Logged In: YES user_id=191458 But maybe [clock scan] should be able to handle more formats ?
dkf Ticket [1386377fff]: 3 changes
[History diff]2005-12-21 15:54:53
kennykbplain2006-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.
serhiy.storchakawiki2026-10-21 10:03:38
The default clock format uses the zone name again since 8.5.0 ([7d3492d3c1]), and free-form clock scan accepts positive numeric offsets such as +0000/+0100 since 8.6.11 ([f041312885], ticket [5019748c73]). Both round trips work on 8.6.11+ and 9.x.
serhiy.storchaka Ticket [1386377fff]: 3 changes
[History diff]2026-10-22 17:19:31
Log in (anonymous is fine) to add a comment.
Attachments:
- tcl_clock.patch.txt [download] added by nobody on 2005-12-21 01:05:52. [details]