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: Donald Arseneau <asnd@triumf.ca>
Date: Fri Dec 30 2005 - 02:35:59 CET

"Donal K. Fellows" <donal.k.fellows@manchester.ac.uk> writes:

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

But it isn't!

% expr 0x7fffffff
2147483647
% clock scan "11:55:55 pm dec 31, 2037 gmt"
2145916555
% clock scan "11:59:59 pm dec 31, 2037 gmt"
2145916799
% clock scan "00:00:00 am jan 1, 2038 gmt"
unable to convert date-time string "00:00:00 am jan 1, 2038 gmt"

So (1) "11:55:55" is a wierd time, and probably a typo for "11:59:59",
and (2) the clock scan command truncates the epoch to a convenient calendar
time, rather than using up all available seconds.

-- 
Donald Arseneau                          asnd@triumf.ca
Received on Tue Jan 3 03:09:42 2006