Skip to content
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

Open
sparkprime opened this issue Nov 6, 2014 · 5 comments
Open

Add a date library #21

sparkprime opened this issue Nov 6, 2014 · 5 comments

Comments

@sparkprime
Copy link
Member

Code to convert to/from tuples like {year: x, month:x, ... seconds: x } into textual / other structured representations (seconds since epoch, etc).

@sparkprime
Copy link
Member Author

@oconnorr

@oconnorr
Copy link
Contributor

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.

@sparkprime
Copy link
Member Author

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.

@davidzchen
Copy link
Contributor

Could we make use of cctz for this?

@oconnorr
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants