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

Support for ISO 8601 compliant zoned date times #64

Open
maxdietrich opened this issue Jul 30, 2018 · 3 comments
Open

Support for ISO 8601 compliant zoned date times #64

maxdietrich opened this issue Jul 30, 2018 · 3 comments

Comments

@maxdietrich
Copy link
Contributor

Hey, it would be cool, if .format() could be expanded in such a way that one could add time zones, so that the resulting string would become a ISO 8601 compliant zoned date time like

2018-07-30T04:44:42+02:00
@cullophid
Copy link
Owner

there is currently no timezone support in date-fp. It is something we have been considering, but we dont have much time to work on the lib atm.
If you wish to try and tackle it we would very much appreciate a PR :)

@maxdietrich
Copy link
Contributor Author

Okay, I just found out that Javascript Dates are always saved in UTC without any timezone information. (date-fns/date-fns#489 (comment)). This means .format() could only ever return the local time zone, which is not neccessarily the one the date was passed on creation. I'd assume this would probably be quite confusing for some users and in doubt should be left out of the framework. What do you think?

@cullophid
Copy link
Owner

I agree, but timezone support is not trivial.
Currently data-fp just ignores the concept entirely. That way if you give it a date in utc its in utc if you give it a date in local time its localtime etc.

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

No branches or pull requests

2 participants