Tcl Source Code

View Ticket
Login
Ticket UUID: 1811495
Title: clock scan (possible?) discrepancy
Type: Bug Created on: 2007-10-11 11:54:11
Submitter: avl42 Assigned to: kennykb
Subsystem: 06. Time Measurement Severity:
Priority: 5 Medium Last modified: 2008-03-31 14:54:15
Status: Open Closed by:
Resolution: None Closed on:
Version: obsolete: 8.5b1
Description:
I'm not sure, if it is a real bug, but since Kevin
asked me to file it, I do so:

Andreas Leitgeb wrote:
> command:  clock scan "01/01/1902"
> 8.4 resp: -2145920400
> 8.5 resp: -2145924000
> These are one hour off.  I don't know why, since for "01/01/1970"
> they're still consistent!  The day where they become different is
> between 04/30/1916 (diff)  and 05/01/1916 (same)
    
Hmm, could this have to do with the fact that Summer Time was first
observed in Germany starting at 23:00 on 30 April 1916?  It's
conceivable that there is a very subtle bug in the tzdata compiler
that gives wrong times for dates before the first transition.  If
so, it's quite subtle, since it does *not* fail in :America/Detroit
(the test suite checks).
User Comments:
kennykb added on 2008-03-30 11:54:25:
Logged In: YES 
user_id=99768
Originator: NO

What platform is this, and what is the setting of the TZ
environment variable?  I ask because I get the answer

% clock scan "01/01/1902" -timezone :Europe/Berlin
-2145920400

on both Windows and Linux, and this answer is clearly
correct.  This result gives me confidence that the German
time zone data is correct.  But if this is a Unix system,
we might be using zoneinfo to get the time, and it's
conceivable that the zoneinfo decoding has a problem.

avl42 added on 2008-03-31 01:29:11:
Logged In: YES 
user_id=830354
Originator: YES

I've three different linux machines with three different 
distributions/versions and different tcl-versions:

ubuntu gutsy, tcl=8.5.2, Europe/Vienna:  -2145920400
ubuntu feisty, tcl=8.5b1.1, Europe/Vienna:  -2145924000
debian 4.0, tcl=8.5.2b1, CET, Europe/Vienna: -2145924000

On the "CET" machine, I then changed it to Europe/Vienna,
but this made no difference.

kennykb added on 2008-03-31 11:36:40:
Logged In: YES 
user_id=99768
Originator: NO

OK, so it appears to be correct on Gutsy, but
wrong on Debian 4.0 and Feisty.  All of these
systems use 'zoneinfo', so I suspect some sort
of difference between the zoneinfo files on
the three systems.  

Is the output of

zdump -v -c 1917 Europe/Vienna

the same among the three systems?
 
(Hmm, I also notice that the Gutsy system is running
8.5.2, while the others are running 8.5b1?
Could this be something that got fixed a
while ago, perhaps with the changes of 2007-03-08
or 2005-08-12?)

[email protected] added on 2008-03-31 14:54:15:
Logged In: NO 

The output of that zinfo command *is* the same on all three machines,
even if I don't cut it off at 1917, and I also piped it to md5sum
with equal results across the machines:

$ zdump -v Europe/Vienna | md5sum
e89027cfa32a91d41fab072764a13e14  -
(didn't want to copy+paste the whole output here.
Let me know, if you want it per email. It seems like
can't attach files here.)

ubuntu gutsy doesn't ship tcl8.5 (gutsy is a few months older than
even tcl 8.5.0).   The version of tcl I have on each machine indicates
the time I last compiled+installed tcl8.5 from source on each machine.
Since all of the bugs (that were since fixed) didn't seem to bite
me yet, I usually compile some new version of tcl8.5 only on the
machine that I'm sitting at that particular time, so the machines
that I sit less often at, tend to stick at older versions :-)