|
2008-06-17
| ||
| 12:52 | • Closed ticket [1995175fff]: clock scan problems on windows plus 7 other chan... artifact: 5d0cf25a13 user: cnassau | |
| 09:36 | • Pending ticket [1995175fff]. artifact: 691aef11b9 user: kennykb | |
| 09:24 | • Ticket [1995175fff]: 4 changes artifact: 5ce6eec458 user: kennykb | |
| 08:13 | • Ticket [1995175fff]: 4 changes artifact: 24e21a4066 user: kennykb | |
|
2008-06-16
| ||
| 14:04 | • New ticket [1995175fff]. artifact: c07f4ec90d user: cnassau | |
clock scan problems on windows
Closed1995175fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 18 years ago
Descriptionplain2008-06-16 14:04:21
clock scan seems to have an issue with dates before 02 Jan 1970 on Windows XP:
% clock scan "02 Jan 1970"
82800
% clock scan "01 Jan 1970"
time value too large/small to represent
Setting an explicit timezone avoids the problem (i.e. [clock scan "01 Jan 1970" -timezone :GMT] works).
Google knows about a lot of "mktime fails with negative values" complains which might be related.
Also, while investigating this issue, I tried
tcl::clock::ConvertLocalToUTC {stuff that's not important} {} 12345
This gives a segfault (both on Windows and Solaris)
kennykbplain2008-06-17 08:13:48
Logged In: YES user_id=99768 Originator: NO Hmm. The issue on Windows XP is puzzling. Are you running a stock Tcl installation? The symptom is consistent with the default timezone being set to :localtime, but that shouldn't happen on Windows. Tcl gets the system time zone from the Registry, uses a tzdata file corresponding to the zone if it has one, and generates a Posix-style time zone string if it does not. Is it possible that you removed the $tcl_library/tzdata directory (or the file for the zone in question) from your installation? In order to troubleshoot this further, let's find out the following: (1) What's the result of ::tcl::clock::GuessWindowsTimeZone ? (If that's :localtime, we need to troubleshoot what's wrong with the registry. But I'm guessing that it will have returned some actual time zone name.) (2) If it returns a correct time zone name, what is it? Does the file $tcl_library/tzdata/$timezone (where $timezone is the returned timezone) exist? Does the directory exist at all? If the file doesn't exist, you can no doubt get around this problem by fixing your installation. But still, even if *that* messes up, too, we're still supposed to recover and give a Posix time zone. So something is seriously deranged here. Maybe the answers to the questions so far will give more of a hint where to look. The segfault is a separate issue. Since ConvertLocalToUTC is private, I haven't thoroughly tested what it does with bad args. Obviously, you've found a combination that crashes it. I'll fix that bit while I'm waiting for further information.
kennykbplain2008-06-17 09:24:53
Logged In: YES user_id=99768 Originator: NO The segfault is fixed, but has nothing to do with the main reported bug. Ah... I now have a WinXP system that reproduces the bug. Will investigate further.
kennykbplain2008-06-17 09:36:46
Logged In: YES
user_id=99768
Originator: NO
Oh... The registry package doesn't load
without help when testing Tcl in the
build directory. Are you perhaps testing
against an uninstalled Tcl? If
so, try doing
load $build_directory/tclreg12.dll Registry
prior to doing anything with [clock]. If the
registry package can't be loaded, what
you describe will be the symptom.
[make test] and [make runtest] get around this
by using
::tcltest::loadTestedCommands
load $::reglib Registry
to force the registry package into the interpreter
before attempting to touch [clock].
If I don't hear otherwise, I'll presume that's
what happened and let the system close the bug.
cnassauplain2008-06-17 12:52:48
Logged In: YES user_id=902560 Originator: YES Ah, indeed: we forgot to copy the dde and registry packages when we bundled Tcl on Windows... once they are installed, everything works fine again. Sorry for all the fuss. Thanks for the timely response!
Log in (anonymous is fine) to add a comment.