|
|
Log in / Subscribe / Register

The road to Zettalinux

The road to Zettalinux

Posted Sep 19, 2022 12:35 UTC (Mon) by eru (subscriber, #2753)
In reply to: The road to Zettalinux by jem
Parent article: The road to Zettalinux

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.


to post comments

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