| Ticket UUID: | 1386377 | ||
| Title: | clock scan [clock format [clock seconds] -gmt 1] | ||
| Type: | Bug | Created on: | 2005-12-20 18:05:52 |
| Submitter: | nobody | Assigned to: | kennykb |
| Subsystem: | 06. Time Measurement | Severity: | |
| Priority: | 5 Medium | Last modified: | 2026-10-22 17:19:31 |
| Status: | Closed | Closed by: | serhiy.storchaka |
| Resolution: | Fixed | Closed on: | 2026-10-21 10:03:38 |
| Version: | obsolete: 8.5a4 | ||
| 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: | ||||
nobody added on 2005-12-21 01:05:52:
File Added - 160560: tcl_clock.patch.txt 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 ? 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. serhiy.storchaka added on 2026-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. | ||||
Attachments:
- tcl_clock.patch.txt [download] added by nobody on 2005-12-21 01:05:52. [details]
