On 6 August 2012 18:28, Toby Thain <toby at telegraphics.com.au> wrote:
On 06/08/12 11:44 AM, Johnny Billquist wrote:
...
Unix choose 32-bit integers, counting seconds since 1970. Also a rather
restricted range, and yes, it will run out in 2038, or something like
The 32 bit representation does.
$ date -r `echo '2^31-1'|bc`
Mon 18 Jan 2038 22:14:07 EST
Breaking many utilities:
$ date -r `echo '2^31'|bc`
Fri 13 Dec 1901 15:45:52 EST
But most Unixes now use a 64 bit representation, I believe.
Even those on VAX :)
$ date -r `echo '2^55'|bc`
Sun Jun 13 07:26:08 BST 1141709097
$ uname -srm
NetBSD 6.99.7 vax
Though...
$ date -r `echo '2^56'|bc`
date: localtime 72057594037927936 failed: Value too large to be stored
in data type
Tsk, now there is an arbitrary and completely irrelevant limit :)