Timezone problems. Moves everything over a day
See original GitHub issueDo you want to request a feature or report a bug?
Code for screenshot(13)
//moment.tz.setDefault("America/Vancouver"); console.log(moment().format()); BigCalendar.setLocalizer(BigCalendar.momentLocalizer(moment));
Code for screenshot(14)
moment.tz.setDefault("America/Vancouver"); console.log(moment().format()); BigCalendar.setLocalizer(BigCalendar.momentLocalizer(moment));
You can see that the current date in the calendar moves over to the 16th when it is in fact the 17th in both timezones. You can see that I am console logging the moment date out. Does anyone have any ideas on how to fix this?
What’s the current behavior?
You can see the error clearly in this sandbox: https://codesandbox.io/s/m34q6xw6lx
It shifts all of the days over by one. Saying the current date is one less than the real current date. Line 7 in the sandbox makes this occur, for some reason setting the moment timezone shifts all the days over by 1.
What’s the expected behavior?
The expected behavior would be to display the correct dates, instead of moving everything over a day.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:11
Top GitHub Comments
I found a simple workaround for this, but it only works for display purposes. We are not doing any actions from the calendar apart from showing the events.
No need to do anything specific for the
localizer
, just use your local one without setting the default timezone formoment
.I have the same problem when setting the timezone that behind the local timezone