Version 3 of clock scan

Updated 2007-11-14 15:08:41 by jmn

Part of the clock command. See http://purl.org/tcl/home/man/tcl8.4/TclCmd/clock.htm for the formal man page.


JMN 2007-11-14

On FreeBSD - you can configure the timezone to UTC by removing /etc/localtime. I don't know if this is actually a legitimate way to set it to UTC, but it was the only way I knew of until now, and it does seem to cause a problem with Tcl's clock scan.

 % clock scan "2007-11-01" -format "%Y-%m-%d"
 time value too large/small to represent
 % clock scan "2007-11-01" -format "%Y-%m-%d"
 1193875200

The call always fails the first time in each process, and seems to work for all calls thereafter. (including in other interps)

If you configure the timezone to UTC by instead making /etc/localtime a link to /usr/share/zoneinfo/Etc/UTC the problem doesn't occur. I have a number of systems configured with no /etc/localtime - but I guess I'll change that now in light of this.

This issue also shows up in the FAQ on amsn-project.net

Is a missing /etc/localtime something that clock scan should be able to handle - or is it would it be considered an OS configuration issue?


Category Command Category Date and Time