Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It wouldn't really be much different if we had ISO8601.1 and ISO8601.2, would it? The standard can define two different types, and it makes it clear what it means to have a time without an offset specifier. It also defines formats for durations, intervals, and repeating intervals.

Is the distinction in representation too subtle?

We accept this subtlety elsewhere; we are used to 0 and "0" being different things, and expect them to behave differently under operators. Few would find the following surprising:

    0 + 0 == 0
    "0" + "0" == "00"
Then why would we expect these to behave the same?

   20200710T010000Z + `3 hours`
   20200710T010000 + `3 hours`
The first is a fixed timestamp in UTC, the result of the second depends on timezone.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: