|
|
Log in / Subscribe / Register

The road to Zettalinux

The road to Zettalinux

Posted Sep 18, 2022 21:47 UTC (Sun) by Wol (subscriber, #4433)
In reply to: The road to Zettalinux by k8to
Parent article: The road to Zettalinux

2038 is a Unix problem.

Y2K was a logic problem.

Pick had a "day 10,000" problem (counting from day 1 = 1 Jan 1968 iirc, can't remember the exact date). The number of programs that assumed (a) internal dates were at most 4 digits, and (b) day 9999 was so far into the future it would never arrive. Now we'll have a day 100,000 problem, but that'll be well after we're all gone :-)

At the end of the day, it's all down to people assuming, and not thinking it through. We had a big problem at work when a load of tools (our name for excel spreadsheets that report from Oracle or whatever) broke. TSS were upgrading all our laptops, the default date format somewhere changed, and all the SQL queries that returned dates changed the date format. So when you're using SUBSTRING to extract the bit of the date you want, and the format changes, everything breaks :-) I was *NOT* popular when I said "fix the tool, not the laptop". But they did it ... once I'd berated them that fixing the laptops was a stupid idea :-)

Cheers,
Wol


to post comments

The road to Zettalinux

Posted Sep 19, 2022 8:38 UTC (Mon) by jem (subscriber, #24231) [Link] (2 responses)

>2038 is a Unix problem.

No, 2038 is a C Standard Library problem.

The road to Zettalinux

Posted Sep 19, 2022 12:35 UTC (Mon) by eru (subscriber, #2753) [Link] (1 responses)

The ANSI/ISO standard for C only says time_t is an arithmetic type capable of representing times. It says nothing about its size, or what the time zero is.
The convention of having time_t contain seconds since 1970 is from Unix.

The road to Zettalinux

Posted Sep 19, 2022 14:44 UTC (Mon) by jem (subscriber, #24231) [Link]

Well, does "Unix" say anything about the size of time_t? No, it's the implementation specific ABI which is largely defined by the hardware architecture. Of course C, the library, and time_t all originated from Unix.

My point was that the C standard library time functions are used outside of Unix: in a shipload of Windows software, and a megaton of embedded software that has traditionally been implemented i C and typically uses the C standard library that comes with the compiler.

OK, Unix defines time zero, but how many non-Unix systems using the libc API have defined it differently?


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds