-
-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standardize support for dates / times / time zones #1191
Conversation
… as standardized in dhall-lang/dhall-lang#1191
Here is the matching change to the Haskell implementation: dhall-lang/dhall-haskell#2247 |
The two test files were backwards
… based on feedback from @mmhat and @TristanCacqueray
… based on a discussion with @mmhat
Great work! I appreciate the thoroughness of the tests |
… as suggested by @Nadrieril
… as suggested by @Nadrieril
… as suggested by @mmhat Specifically, we don't permit a standalone `Z`, but we permit `Z` as a suffix for a `Time` or `Date`+`Time`
It turns out that 20 digits of precision doesn't necessarily fit into an `Int` :)
What good does this without the ability for full timestamps? As the text notes, leap seconds aren’t even supported, so you cannot have a (valid!) timestamp that goes to In addition, just having the parts of a timestamp (dates, times, timezone offsets) doesn’t mean it is clear how to construct a canonical date from it. |
Okay, I misread it slightly, it looks like I can have a “normal” timestamp in the surface language, but then it is interpreted as a record that contains the time, date and timezone. Which is a bit … weird, but okay. My biggest problem with this is that time/date logic is not as simple as having a record with three fields, you need a bunch of operations that can convert opaque types into each other (e.g. UTC into UT1 into UNIX timestamps). |
Fixes #80