Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > a convert to lambda-ism

Reply
Thread Tools

a convert to lambda-ism

 
 
Arne Vajhøj
Guest
Posts: n/a
 
      11-18-2010
On 17-11-2010 05:48, Martin Gregorie wrote:
> UNIX had 32 bit time variables, hence its epoch was tiny: 68 years
> (1970-203. This is the shortest date range of any OS I've used.
> Fortunately its since been upgraded to 64 bits, so the UNIX epoch will
> now outlast the universe with a healthy margin for error.


I don't think UNIX specify its size.

Many Unix'es has changed from 32 to 64 bit.

Arne
 
Reply With Quote
 
 
 
 
Martin Gregorie
Guest
Posts: n/a
 
      11-18-2010
On Wed, 17 Nov 2010 19:59:08 -0500, Arne Vajhøj wrote:

> On 17-11-2010 05:48, Martin Gregorie wrote:
>> UNIX had 32 bit time variables, hence its epoch was tiny: 68 years
>> (1970-203. This is the shortest date range of any OS I've used.
>> Fortunately its since been upgraded to 64 bits, so the UNIX epoch will
>> now outlast the universe with a healthy margin for error.

>
> I don't think UNIX specify its size.
>

IIRC UNIX first appeared on the PDP-11, a 16 bit machine with a 32 bit
long int. A 16 bit date measured in seconds would never have worked, so
they must have used 32 bit because it was available and got standardised
on by default and used to define the time_t variable type. At least
that's my guess.

The 2038 date expiry has always been a feature of UNIX and that cut-off
is a clear fit with a signed 32 bit date.

> Many Unix'es has changed from 32 to 64 bit.
>

Yes, but when? Since 2000 for sure, but I have no idea when it happened.
Maybe only since 64 bit chips became common?


--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
 
Reply With Quote
 
 
 
 
Arne Vajhøj
Guest
Posts: n/a
 
      11-18-2010
On 18-11-2010 07:55, Martin Gregorie wrote:
> On Wed, 17 Nov 2010 19:59:08 -0500, Arne Vajhøj wrote:
>
>> On 17-11-2010 05:48, Martin Gregorie wrote:
>>> UNIX had 32 bit time variables, hence its epoch was tiny: 68 years
>>> (1970-203. This is the shortest date range of any OS I've used.
>>> Fortunately its since been upgraded to 64 bits, so the UNIX epoch will
>>> now outlast the universe with a healthy margin for error.

>>
>> I don't think UNIX specify its size.
>>

> IIRC UNIX first appeared on the PDP-11, a 16 bit machine with a 32 bit
> long int. A 16 bit date measured in seconds would never have worked, so
> they must have used 32 bit because it was available and got standardised
> on by default and used to define the time_t variable type. At least
> that's my guess.
>
> The 2038 date expiry has always been a feature of UNIX and that cut-off
> is a clear fit with a signed 32 bit date.


It has been a feature of most Unix implementations.

Unix as in SUS V3 only say:

time_t
Used for time in seconds.

time_t and clock_t shall be integer or real-floating types.

>> Many Unix'es has changed from 32 to 64 bit.
>>

> Yes, but when? Since 2000 for sure, but I have no idea when it happened.
> Maybe only since 64 bit chips became common?


Sometime during the last 10 years seems likely.

Most compilers has supported 64 bit integers even in 32 bit mode.

Arne

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Qestion about convert Object to byte[] and convert it back davidxiongcn@gmail.com Java 5 11-04-2006 04:11 PM
IsNumeric: Convert.ToInt32 vs. Convert.ToInt64 sck10 ASP .Net 4 09-03-2006 09:40 PM
To convert to J2SE 6 or not to convert, that is the question... Jaap Java 4 07-10-2006 09:03 AM
convert list of strings to set of regexes; convert list of strings to trie Klaus Neuner Python 7 07-26-2004 07:25 AM
Do I need to Convert with Convert.ToInt32(session("myNumber")) ? Andreas Klemt ASP .Net 1 07-23-2003 02:59 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57