Angular-calendar: Lost 1 hour for 25 March 2018 in day view

Created on 13 Mar 2018  路  7Comments  路  Source: mattlewis92/angular-calendar

Bug description / Feature request

Lost 1 hour for 25 March 2018 in day view;
image

Minimal reproduction of the problem with instructions

I have Belgium local on my PC
Go to https://mattlewis92.github.io/angular-calendar/#/kitchen-sink and select 25 March 2018

Versions

Angular:

Calendar library:

Browser name and version: Google Chrome Version 64.0.3282.186 (Official Build) (64-bit)

bug has PR

All 7 comments

Pretty sure this is desired and due to the timeshift on 25. march. (+1 hour, from 2am to 3am).

@etwillbefine I understand. But is it normal behaviour?

Hmm thinking about it twice .. logically it makes sense but to the end-user it doesnt. It also doesnt seem to be a common thing.

The dates set in each of the hour grids are timezone dependent (2 is skipped). Theoretically if you use UTC as viewDate you should be able to see the missing hour (haven't tried it yet).

Here is a failing test case: https://github.com/mattlewis92/calendar-utils/compare/dst-change-in-hour-grid?expand=1 (not sure if it works when running the test in a timezone without DST)

I just had a check on other calendars and they don't work like this either, I wonder if there's an easy way to fix this with date-fns rather than hacking in a solution to add fake hours

0.26 is now out and allows you to use moment instead of date-fns. You can then set the timezone to Utc which will avoid any DST issues. I put together an example of this for you here: https://stackblitz.com/edit/angular-cbxyqr?file=demo/component.ts Hope that helps! 馃槃

This is now (finally) solved out the box in version 0.27.18 馃帀

For some reason current time marker becomes unavailable when moment is used. Even on the documentation demo current time marker does not work. Use moment

Is there a way to fix it or any workaround it

Was this page helpful?
0 / 5 - 0 ratings