Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2004-08-19
20:48 • Closed ticket [788187ffff]: Windows timezone strings are not abbrs plus 7 ot... artifact: aef053549f user: kennykb
2004-05-19
03:32 • Open ticket [788187ffff]. artifact: fd34785fae user: kennykb
2004-03-10
22:37 • Closed ticket [788187ffff]. artifact: e53e681714 user: kennykb
2004-03-08
05:13 • Open ticket [788187ffff]. artifact: e48f8a7426 user: jeremysc
2004-03-06
00:52 • Ticket [788187ffff]: 5 changes artifact: 0d635cc708 user: kennykb
00:43 • Pending ticket [788187ffff]. artifact: 7694eafe0c user: kennykb
2003-10-28
20:12 • Ticket [788187ffff]: 2 changes artifact: b3ff617c60 user: dkf
2003-08-14
00:06 • Ticket [788187ffff]: 4 changes artifact: 77906754a6 user: jeremysc
00:06 • Add attachment tclpatch20030813.txt to ticket [788187ffffffffff|788187f... artifact: 1f9de7edf6 user: jeremysc
2003-08-13
17:06 • New ticket [788187ffff] Windows timezone strings are not abbrs. artifact: 2d0fe87fcd user: jeremysc

Windows timezone strings are not abbrs

Closed / Fixed788187ffffffffffffffffffffffffffffffffffCreated 23 years agoUpdated 22 years ago
Descriptionplain2003-08-13 17:06:53
This tcl script outputs a strange result on windows:

puts [clock format [clock seconds]]

Output: Wed Aug 13 12:05:47 PM Central Daylight Time 
2003

Which will not scan. (clock scan "string")

I have a patch that will fix that.

New Output: Wed Aug 13 12:05:47 PM CDT 2003
jeremyscplain2003-08-14 00:06:54
File Added - 58641: tclpatch20030813.txt
dkf Ticket [788187ffff]: 2 changes [History diff]2003-10-28 20:12:35
kennykbplain2004-03-06 00:43:11
Logged In: YES 
user_id=99768

This is indeed a problem, but the proposed fix doesn't
necessarily generate correct abbreviations.

A better approach is probably to use numeric time zones
whenever possible, and otherwise to look up time zone
names based on the GMT offset and DST dates.  I've
test code that does this.  I'm leaving this open as a bug,
but marking it 'Pending.'
kennykb Ticket [788187ffff]: 5 changes [History diff]2004-03-06 00:52:29
jeremyscplain2004-03-08 05:13:33
Logged In: YES 
user_id=399457

I have set my computer to use many many different 
timezones and in every case that I tried, windows generates 
the same abbreviation as my code does.  It appears that the 
Windows timezones are named weird specifically for easy 
generation of abbrevations.


Regardless, even if my code is only correct in 90% of the 
cases that is still better than what it replaces, which is 
working in 0% of the cases.
kennykbplain2004-03-10 22:37:06
Logged In: YES 
user_id=99768

Fixed in my sandbox.  The fix interacts with
[clock scan] in that the abbreviations used 
in [clock format] have to match those used
in [clock scan] - and in old-style RFC822
date strings.  The code also interacts with
the localization changes, so it'll be a little while
before I can commit it.
kennykb Open ticket [788187ffff]. [History diff]2004-05-19 03:32:56
kennykbplain2004-08-19 20:48:37
Logged In: YES 
user_id=99768

Fixed in 8.5.
Log in (anonymous is fine) to add a comment.

Attachments: