I want to get a Date in elm that represents the user's local date and time. I have looked at the core Date module as well as the elm-time package.
The elm-time package has a ZonedDateTime
, but a TimeZone
value must be supplied to it, and therefore, the time zone must be known ahead of time.
At its core, this issue is about reliably determining the user's timezone. The best solution I've come up with, which is too naive to be considered acceptable, is to pass the user's timezone offset via javascript as an application flag and modify a UTC date accordingly.