You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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 :)
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?
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.
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 likeThe text was updated successfully, but these errors were encountered: