question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Events in DST are shown one hour earlier than expected

See original GitHub issue

Version

1.8.0 | Tue Nov 06 2018

Development Environment

Chrome, MacOS

Current Behavior

Events that are created now for April 2019 are shown 1 hour before their actual date. E.g. an event starting Wed Apr 10 2019 12:00:00 GMT+0200 is shown in calendar at 11 AM.

screen shot 2019-01-17 at 7 11 59 pm

Expected Behavior

The event above should be displayed at 12PM. There seems to be an issue with the transition to DST Summer Time?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
wilsonpintocommented, Jan 18, 2019

I can confirm this bug, I will try to make a fix for it

1reaction
mastermoocommented, Feb 4, 2019

ok for future reference, this is what I did and it seems to work pretty nicely:

// => in Feb. it's -60, in April -120 (for Europe/Berlin)
currentZone = moment().zone()

// in my case, offset is either -60, 0 or +60
offset = currentZone - moment(event.start).zone()

correctedStart = moment(event.start).add(offset, 'minutes')
correctedEnd = moment(event.end).add(offset, 'minutes')

Even drag and drop still seems to work. Maybe this code can even help with a possible fix for the issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Events in DST are shown one hour earlier than expected · Issue ...
Events that are created now for April 2019 are shown 1 hour before their actual date. E.g. an event starting Wed Apr 10...
Read more >
Meeting Requests and Appointments are Off by One Hour
If the time on the Day/Week calendar is off by one hour the week after DST changed, also see Daylight Saving Time Calendar...
Read more >
All events shifted one hour after Daylight savings.
All my Calendar events have shifted an hour earlier. I've checked the timezone and verified it is correct, and read other posts on...
Read more >
events in the week of daylight savings shifts events are 1 hour off
Reoccuring events shift by one hour if you chose to look at the one instance of the event and non reoccuring events just...
Read more >
Scheduled events started 1 hour earlier than planned
If you must schedule the event at a certain time instead of an interval a better solution would be to make 2 events...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found