Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2004-03-06
02:03 • Closed ticket [219179ffff]: clock scan clock format [clock seconds] fails ... artifact: 0fd9e47898 user: kennykb
2001-09-18
21:21 • Ticket [219179ffff]: 4 changes artifact: 9618516348 user: nobody
2001-09-07
23:58 • Ticket [219179ffff]: 4 changes artifact: 9bd1327e6d user: vincentdarley
2001-02-08
14:11 • Ticket [219179ffff]: 2 changes artifact: 8ec7f4c2c0 user: dgp
2000-11-06
21:56 • Ticket [219179ffff]: 4 changes artifact: bccf07fd0f user: dkf
2000-10-26
05:02 • New ticket [219179ffff]. artifact: e31eda3904 user: nobody

clock scan [clock format [clock seconds]] fails

Closed219179ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 23 years ago
Descriptionplain2000-10-26 05:02:54
OriginalBugID: 1978 Bug
Version: 8.1
SubmitDate: '1999-05-04'
LastModified: '2000-04-07'
Severity: MED
Status: Assigned
Submitter: pat
ChangedBy: hobbs
RelatedBugIDs: 4918
OS: Windows 95
Machine: X86
FixedDate: '2000-10-25'
ClosedDate: '2000-10-25'


Name: Michael Carter

ReproducibleScript:
clock scan [clock format [clock seconds]]

ObservedBehavior:
The above used to work. Now I get
    unable to convert date-time string "Mon May 03 20:49:17 GMT Daylight
    Time 1999"
    
    I can work around this using the -format option to cut out the GMT
    Daylight Time

DesiredBehavior:
clock scan [clock format [clock seconds]]  should, I think, always work
    as long as your computer date is after the epoch



We need to see if we can grab the abbreviation for the timezone
instead of the longname (that's what's screwing up).  Or perhaps
support the longname in scanning. 
-- 04/03/2000 hobbs
dkfplain2000-11-06 21:56:37
While supporting long-names in scanning is in some ways an optimal fix (since the abbreviations are not unique: BST stands for both British Summer Time and Brazilian Standard Time apparently, according to the comments in tclDate.c) it is also much more complex and usually not what people want anyway; using the abbreviation would actually be less surprising to them.  One way of going from one to the other might be to take the first letter of each (letter-only) word of the long timezone string and put it (capitalized) in as an abbreviation (together with all the other portions verbatim so other ways of handling timezones are tackled rightish.)  OK, this is fragile, but it is also cheap, and if a better solution can't be found...
dgp Ticket [219179ffff]: 2 changes [History diff]2001-02-08 14:11:51
vincentdarleyplain2001-09-07 23:58:44
Logged In: YES 
user_id=32170

I guess this hasn't been addressed, still:

% clock scan [clock format [clock seconds]]
unable to convert date-time string "Fri Sep 07 17:54:53 GMT 
Daylight Time 2001"
% 

It isn't very good that Tcl can't understand the clock 
formats it produces itself...
nobodyplain2001-09-18 21:21:37
Logged In: NO 

This bug appears to be basically the same as 219152.
kennykbplain2004-03-06 02:03:33
Logged In: YES 
user_id=99768

The fix for 788187 will fix this as well.  219152 is a bit
different.
Log in (anonymous is fine) to add a comment.