No updates yet, unfortunately. We understand how important for you to have it fixed, we've marked this ticket as a high-prio, so things will go faster from now.
Is this ticket going to be progressed in the coming month ?
It definitely should be started in next week(s), but we can't predict when it will be finished. We will try our best to fix it fast!
Thank you for your patience!
I just didn't know that I should rather be setting the data property of the store instead adding/inserting records ! Really, appreciate it !
I would like to ask more about the following scenario:
We have implemented real time data communication with the server. So when the user entered the app, we load all events, then every X seconds, server is sending us record updates e.g.: event with id X changes start time to Y or event with id X changes resource id to Y.
With this is mind, I would like to avoid setting all data every time record changes. I would prefer to implement mechanism to:
set all events in store when the user entered app for the first time (this.eventStore.data = data.events;) then
insert new event record to the store when server says so (e.g.: another user creates new event)
update event record when server says so (another user updates the record)
do you have any recommendation, can you think of other store methods that perform time conversion ? or in that case I should rather manually perform time conversion (e.g.: use TimeZoneHelper.toTimeZone) and use add/insert methods ?
You're right. The typing for the timeZone field will be fixed to allow null in the next release.
Will do a quick look at your code to see if I can find a workaround. I'll let you know in a bit.
Setting timeZone to null is a way to tell the time zone converted Scheduler that this newly added record should be converted from the local system time zone into the configured time zone. Per default, the Store's add and insert functions treats the record's dates as in the currently configured time zone. Mostly because if new records are added with the UI, those records should not be time zone converted.
So, a short answer: Setting the timeZone field to your local system time zone should work as well as setting it to null:
events.push({
id: i,
manuallyScheduled: true,
resourceId,
startDate: eventStartDateTime,
endDate: eventEndDateTime,
name: `${eventStartDateTime} - ${eventEndDateTime} (TZ: ${this.timeZoneIana})`,
timeZone: new Intl.DateTimeFormat().resolvedOptions().timeZone
});
I would like to ask if applyChangeset method on the EventStore is designed to accept event start and end date updates and that the timezone conversion is applied on the record (to the project timezone configuration).
I observe the followings (see the attached angular demo):
The event is displayed incorrectly. Sounds like timezone conversion is lost. Event is now displayed between 15:00 and 18:00 (UTC+1 - the computer timezone)
I would expect that the event is still displayed in UTC, which is 14:00 - 17:00.
It is interesting that the second update works but the third one not.
I redesigned our store update logic and started removing event and then adding them again to the store. Events are displayed just fine but unfortunately, it causes us more problems (e.g. we lost the reference to the selected event. which we rely on etc.)
We need to find the way to update the event (we don't want to remove and add them again.)