-
Notifications
You must be signed in to change notification settings - Fork 434
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
Add a date library #21
Comments
Do you want the Jsonnet output to be dependent on or independent of the contents of the Olson time zone database that happens to be installed on the local system? If independent, then you cannot do date/time conversions based on time zone (you are restricted to using UTC offsets), but you could write it in Jsonnet. If dependent, then Jsonnet isn't hermetic and some operations need to be built-in. |
I can't remember who initially suggested this or what they wanted it for. But, yes I think it would have to be UTC and static offsets only, otherwise it would no-longer be hermetic. |
Could we make use of cctz for this? |
Using cctz, or any other tool for dealing with civil time, would make Jsonnet output dependent on the contents of /usr/share/zoneinfo whose content varies from machine to machine and from month to month. |
Code to convert to/from tuples like {year: x, month:x, ... seconds: x } into textual / other structured representations (seconds since epoch, etc).
The text was updated successfully, but these errors were encountered: