Time.here function in
elm/time has the following note:
[…] This means the
Zoneyou get from this function will act weird if (1) an application stays open across a Daylight Saving Time boundary or (2) you try to use it on historical data.
I assume this applies to future dates as well? Time.here calculates the offset using
-(new Date().getTimezoneOffset()) which means that you get the current offset. To get the offset of a timestamp in the future, I believe I need to provide
new Date with the timestamp like this:
First question: Is my assumption correct?
Second question: Have you solved this problem in another way?
justinmimbs/timezone-data suggests looking into GitHub - github/time-elements: Web component extensions to the standard <time> element. for my use case, displaying future events dates in a nice format. I will try out
time-elements but I’m curious to know about your experience in this subject.