From: chris on
On 04/03/10 06:32, Chris Ridd wrote:
> On 2010-03-04 00:37:51 +0000, Richard Tobin said:
>> If there are still x86 32-bit systems around by then (which wouldn't
>> surprise me - the 80386 was introduced 25 years ago, and there's only
>> 28 years left), a workaround would be to change the interpretation of
>> large negative times, making the range (say) 1950-2087, instead of
>> 1901-2038.
>
> The main problem is that time_t values of -1 are defined to indicate an
> error (which is the only reason time_t is signed), so you'd need to
> figure out a way to avoid that.
>

I was wondering why they used a signed int. An unsigned int would have
been more sensible, but the error checking makes sense.
From: Richard Tobin on
In article <hmnubk$fqe$1(a)news.eternal-september.org>,
chris <ithinkiam(a)gmail.com> wrote:

>I was wondering why they used a signed int. An unsigned int would have
>been more sensible, but the error checking makes sense.

Why wouldn't you want to represent dates in the past?

-- Richard



--
Please remember to mention me / in tapes you leave behind.
From: Chris Ridd on
On 2010-03-04 09:51:29 +0000, Richard Tobin said:

> In article <hmnubk$fqe$1(a)news.eternal-september.org>,
> chris <ithinkiam(a)gmail.com> wrote:
>
>> I was wondering why they used a signed int. An unsigned int would have
>> been more sensible, but the error checking makes sense.
>
> Why wouldn't you want to represent dates in the past?

You're never going to be able to represent arbitrary dates using a
built-in integer type. Use struct tm instead.

--
Chris

From: R on
Peter Ceresole <peter(a)cara.demon.co.uk> wrote:

> Well, checking Palm desktop running (very nicely) under OS10.4.11, in
> mid-Feb 2040 it wraps round to 1904.

That's true of real time, too. Physicists haven't noticed.
From: R on
Richard Tobin <richard(a)cogsci.ed.ac.uk> wrote:

> Unix uses the number of seconds since Jan 1 1970. It traditionally
> stores this in a 32-bit signed integer, which will overflow in
> 2038. Presumably this will have changed to a 64-bit integer long before
> then.

I'm running the 64-bit kernel. Would that use 64-bit time?
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13
Prev: iTunes - sync Gmail contacts ?
Next: Bookmark Syncing