[Haskell-cafe] Parsing LocalTime from Unix seconds

Tobias Dammers tdammers at gmail.com
Wed Sep 19 12:52:59 UTC 2018

On Mon, Sep 17, 2018 at 09:12:38AM -0400, Viktor Dukhovni wrote:
> > On Sep 17, 2018, at 2:01 AM, Tobias Dammers <tdammers at gmail.com> wrote:
> > 
> > Also, unix time may represent either actual seconds elapsed since epoch, or
> > "logical" seconds since epoch (ignoring leap seconds, such that midnight
> > is always a multiple of 86400 seconds).
> That would be a violation of the specification:
>   http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_16

Ah yes, you are right. Problem is, while Unix systems to day use Unix
time this way, not all other software systems do, or they may assume
that "current unix timestamp - some unix timestamp in the past =
exact number of seconds elapsed between timestamps". Which doesn't hold
in the presence of leap seconds, no matter how you implement them. In
other words, people use Unix timestamps (both the word and actual
implementations) sloppily.

More information about the Haskell-Cafe mailing list