Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lost 1 hour for 25 March 2018 in day view #477

Closed
lespons opened this issue Mar 13, 2018 · 7 comments
Closed

Lost 1 hour for 25 March 2018 in day view #477

lespons opened this issue Mar 13, 2018 · 7 comments

Comments

@lespons
Copy link

lespons commented Mar 13, 2018

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)

@etwillbefine
Copy link
Collaborator

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

@lespons
Copy link
Author

lespons commented Mar 13, 2018

@etwillbefine I understand. But is it normal behaviour?

@etwillbefine
Copy link
Collaborator

etwillbefine commented Mar 13, 2018

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)

@mattlewis92
Copy link
Owner

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

@mattlewis92
Copy link
Owner

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! 😄

@mattlewis92
Copy link
Owner

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

@horsebuzz
Copy link

horsebuzz commented Oct 2, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants