Skip to content
Tcl Source Code View Ticket
Login

View Ticket

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: