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
Chrome 71.0.3578 (Mac OS X 10.14.1) day8.apps-lib.cljstime-local-date-test local-date-interval-test FAILED
FAIL in (local-date-interval-test) (cljs/test.js:433:14)
expected: (=
29
(time/in-days interval))
actual: (=
29
28)
diff: - 29
+ 28
The issue is that in 2016, New Zealand switched over to daylight savings time on Sunday 25th September. (time/in-days) on Interval bottoms out by calculating the millisecond difference between two dates. On Sunday 25th the clocks went forward an hour, meaning there was 'one less hour' in that day. This means that there is one hour less between the two local dates than there would ordinarily be at other times of the year.
I wonder whether in-days on at least goog.date.Date should count the number of days between the dates, not counting the number of milliseconds between them?
The text was updated successfully, but these errors were encountered:
@danielcompton I had some similar issues a while back with local dates.
I did a couple of PR's to fix but decided to work on a new library, which has resulted in tick https://github.com/juxt/tick . We're planning to do an announce shortly.
Thanks, that was helpful in pointing me towards this comment: #22 (comment). I've been experimenting locally with making a UtcDate type where DateTime : UtcDateTime :: Date : UtcDate. It seems to provide a good foundation for dealing with local dates that have no time nor timezone.
In New Zealand, the following test will fail:
The issue is that in 2016, New Zealand switched over to daylight savings time on Sunday 25th September.
(time/in-days)
onInterval
bottoms out by calculating the millisecond difference between two dates. On Sunday 25th the clocks went forward an hour, meaning there was 'one less hour' in that day. This means that there is one hour less between the two local dates than there would ordinarily be at other times of the year.I wonder whether
in-days
on at leastgoog.date.Date
should count the number of days between the dates, not counting the number of milliseconds between them?The text was updated successfully, but these errors were encountered: