Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: Y2K + 38



>Every UNIX I've seen uses a signed long (i.e., a 32 bit number) to hold
>the date information.  Moving to a long long (i.e., a 64 bit number) would
>break binary compatibility.  There's probably a good reason why an
>unsigned long isn't being used, but I can't think of it right now.

The only one I've ever thought of us is that no-one thought it would
matter. Having to type 'unsigned' is a pain. :-) [1]

There have been some small steps towards solving 2038 problems early:

1.win32 uses 64-bits for file timestamps (at least in the API - I don't
know which file systems actually use it). It's a bit more awkward to use,
but not too bad.

2.If your software is going down to days (ie. doesn't care about time of
day) then you can use julian days, which are a 32-bit integer for number of
days since about 4000B.C.

Anyone know of any others?

Darren

[1]: Actually I seem to remember there were some problems using unsigned
longs on 16-bit machines. Something like arithmetic was slower than for
signed longs???
-------------------------------------------------------------------
Next Nomikai: 14 January 1999, 19:30 Tengu TokyoEkiMae 03-3275-3691
*** it will will be Jan 14 (Thu), as Jan 15 (Fri) is a natl holiday
Next Technical Meeting: Feb 13 (Sat), 12:30    ace: Temple Univ.
-------------------------------------------------------------------
more info: http://tlug.linux.or.jp                     Sponsor: PHT


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links