Re: elapsed time
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: elapsed time

From: Adrian Ho <tcl@03s.net>
Date: Fri Dec 30 2005 - 14:25:25 CET

On 2005-12-29, Donal K. Fellows <donal.k.fellows@manchester.ac.uk> wrote:
> Robert Hicks wrote:
>> 11:55:55? That is a wierd time to stop at...
>
> It's 2**31-1 (= 0x7fffffff) seconds after the start of the epoch
> (beginning of the year 1970 in the GMT timezone).

Actually, 23:59:59 Dec 31 2037 is still well shy of 2**31-1 seconds:

% clock scan "23:59:59 Dec 31 2037"
2145887999
% expr 0x7fffffff
2147483647

I think slebetman was really demonstrating a deliberate coding decision
(in tclDate.c) to limit acceptable year values to <= 2037 when going
from DMY to epoch. That limitation, though, is asymmetric:

% clock format [expr [clock scan "23:59:59 Dec 31 2037"] + 1]
Fri Jan 01 00:00:00 SGT 2038

Regards,
Adrian
Received on Tue Jan 3 03:09:47 2006