TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
X-To:
Jacob Sparre Andersen <[log in to unmask]>
Date:
Fri, 5 May 2000 21:13:29 +1000
Reply-To:
Alan and Carmel Brain <[log in to unmask]>
Subject:
MIME-Version:
1.0
Content-Transfer-Encoding:
7bit
Content-Type:
text/plain; charset="iso-8859-1"
From:
Alan and Carmel Brain <[log in to unmask]>
Parts/Attachments:
text/plain (34 lines)
From: "Jacob Sparre Andersen" <[log in to unmask]>
> > I have heard that the programming language "C"   will out
> > grow its date package in I think 2030.
> > I was wondering if there is any fact to this?

> The year is 2038 iirc, and it is not as much a problem with
> C as with the date handling functions in many Unixes.
> Switching from a "32 bit compiler" to a "64 bit compiler"
> shold delay this problem a few million years.

Yes but....
The problem is that in the original Unix, all times are determined in the
number of seconds since 1970 IIRC. In any event, this is a 32-bit
integer, that will overflow at about 2am on Feb 18th, 2038, again IIRC.
This is because most Unices are written in C, and use the C standard
library functions.

The C programming language has standard libraries for converting
time in secs since 1970 to date, and vice-versa. The file structures
usually have the "time last accessed" as this 32-bit number. Converting
to a 64-bit compiler is great, but your OS and file structure might be
still affected.

So this affects only C and Unix, Right? Alas no, it affects a lot of
Operating Systems that have C components. Like Windows 95, 98,
NT, and I think 2000, also Win 3.11, in fact, a significant propoportion
of the world's computers. Of Macs I know not, but it wouldn't surprise
me if they had the same problem on some versions of their OS's,
especially the ones with significant bits of Unix in them (via Next).

So Ada for Windows might work, but Windows won't. Look up the
definition of "Y2k compliant" on the Microsoft site. They say ot means
"good till 2035" just for this reason.

ATOM RSS1 RSS2