tech-kern archive

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

Re: Support for tv_sec=-1 (one second before the epoch) timestamps?





On Sat, Dec 15, 2018, 1:17 PM Mouse <mouse%rodents-montreal.org@localhost wrote:
> Might I suggest that the obvious solution to this, and probably a
> host of other issues, is to make time_t an always negative number
> (negint/neglong?) and redefine the epoch as 03:14:09 UTC on Tuesday,
> 19 January 2038,

While it's academic as far as this thread is concerned, you can get
much the same effect by making time_t a (positive) unsigned value and
redefining the epoch to be 1901-12-13 20:45:54 UTC.

No, it is not. That breaks the naive seconds since 1970 to/from broken down time that is specified in the standard (which is a fatal flaw since it assigns no unique value to leap seconds, pretending that they don't exist).

Warner


But, if you're going to redefine the epoch, there are a whole lot of
options available.

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML                mouse%rodents-montreal.org@localhost
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index