You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library does not handle leap seconds, and is based on an incorrect understanding of Unix time.
Therefore I think it's not usable as the core time library for Elm.
With POSIX time, it does not matter where you live or what time of year it is. It is just the number of seconds elapsed since some arbitrary moment (in 1970).
It does matter what time of year it is, because during a leap second a Unix timestamp exists twice
Seconds elapsed since some arbitrary moment minus leap seconds
So to show a human being a time, you must always know the POSIX time and their time zone.
and wether you're currently experiencing a leap second or note
Point is, the only thing ISO 8601 is good for is representing a Time.Posix, but less memory efficient and more confusing.
Incorrect. It's impossible to specify the moment 1998-12-31T23:59:60.5 with posix time, although that moment existed.
So currently there is a timeframe of 27 seconds since 1970 which can not be specified with this library, and this number will increase in the future. I think this is not acceptable for a core time library.
So I recommend using Time.posixToMillis and Time.millisToPosix for any client/server communication you control.
I'd recommend to never use the unix time for any communication due to aforementioned ambiguities.
The default time data type should probably rather be something like this:
type alias Moment={ year :Int, month :Month, day :Int, hour :Int, minute :Int, second :Int, millisecond :Int}
or
type Moment=MomentString// e.g.Moment"1998-12-31T23:59:60.5"
(Moment is the nomenclature used in the ISO 8601 specification, and is better suited than Time in my opinion)
The text was updated successfully, but these errors were encountered:
This library does not handle leap seconds, and is based on an incorrect understanding of Unix time.
Therefore I think it's not usable as the core time library for Elm.
and wether you're currently experiencing a leap second or note
Incorrect. It's impossible to specify the moment
1998-12-31T23:59:60.5
with posix time, although that moment existed.So currently there is a timeframe of 27 seconds since 1970 which can not be specified with this library, and this number will increase in the future. I think this is not acceptable for a core time library.
I'd recommend to never use the unix time for any communication due to aforementioned ambiguities.
The default time data type should probably rather be something like this:
or
(
Moment
is the nomenclature used in the ISO 8601 specification, and is better suited thanTime
in my opinion)The text was updated successfully, but these errors were encountered: