Init Calendar localizer by momentLocalizer by default time zone specified as following:
moment.tz.setDefault('pacific/Fiji'); //UTC+12
var localizer = momentLocalizer(moment);
Prepare a event:
{
id: 1,
title: 'Long Event',
start: new Date("2015-04-12T08:10:00Z"),
end: new Date("2015-04-14T08:40:00Z"),
}
When your client is in a time zone which utc-offset is less than pacific/Fiji utc-offset, I am working on UTC+8 , this event will only display on 4/12, 4/13, not cover 4/14, the event on pacific/Fiji local time should be 4/12/2015 20:10 - 4/14/2015 20:40. Seems momentLoalizer/browserTZOffset make an incorrect compensation.
Check that this is really a bug
Reproduction link
https://codesandbox.io/s/react-big-calendar-example-forked-n4c3k7?file=/src/App.js
Bug description
Init Calendar localizer by momentLocalizer by default time zone specified as following:
Prepare a event:
When your client is in a time zone which utc-offset is less than pacific/Fiji utc-offset, I am working on UTC+8 , this event will only display on 4/12, 4/13, not cover 4/14, the event on pacific/Fiji local time should be 4/12/2015 20:10 - 4/14/2015 20:40. Seems momentLoalizer/browserTZOffset make an incorrect compensation.
Expected Behavior
No response
Actual Behavior
No response
react-big-calendar version
1.8.1
React version
17.0.2
Platform/Target and Browser Versions
windows 11 edge
Validations
Would you like to open a PR for this bug?