#1220 clock scan [clock format [clock seconds]] fails

obsolete: 8.1
closed
Kevin B KENNY
5
2004-03-05
2000-10-26
Anonymous
No

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

Discussion

  • 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...

     
  • Don Porter
    Don Porter
    2001-02-08

    • assigned_to: nobody --> kennykb
    • labels: 104236 --> 06. Time Measurement
     
  • Vince Darley
    Vince Darley
    2001-09-07

    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...

     
  • Logged In: NO

    This bug appears to be basically the same as 219152.

     
  • Kevin B KENNY
    Kevin B KENNY
    2004-03-05

    Logged In: YES
    user_id=99768

    The fix for 788187 will fix this as well. 219152 is a bit
    different.

     
  • Kevin B KENNY
    Kevin B KENNY
    2004-03-05

    • status: open --> closed