Dealing with time zones in Elm seems more painful than it should be. For example, showing a UTC date in the users local time. Should be a simple task, but it seems like there's no way to do this that doesn't involve a third-party package or Native. Am I missing something?
I think it would be useful to have a new function in Date for getting the timezone offset. Just getting the offset in minutes should be enough for someone to create a more robust package for advanced usage.
It looks like this has been implemented in #739. Any chance that could be merged for 0.19? That PR has some other stuff too. I'm happy to create a new PR with just the timezone offset added if that would be useful.
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
I've been waiting for this for a year. This is my second try, my Native extension was rejected.
Many apps will need these functions to canonicalize dates before speaking with backends.
Better luck next year, maybe.
I noticed this was labeled as an "enhancement". UTC support is a critical requirement and I see several related PRs/issues from the past 2 years that have been closed yet still no support for UTC in the Core libraries. #739 looks pretty straightforward and should be merged in ASAP.
Tracking in #816
Most helpful comment
I noticed this was labeled as an "enhancement". UTC support is a critical requirement and I see several related PRs/issues from the past 2 years that have been closed yet still no support for UTC in the Core libraries. #739 looks pretty straightforward and should be merged in ASAP.