Advanced Bubblers - How to Create a Calendar Pattern that is Timezone Aware

I’m using the list shifter plugin to create the new date ranges. So I take the date ranges saved, such as March 1, 2020 12:00PM - March 1, 2020 5:00PM and allow the user to pick a date from a calendar which would be June 1, 2021 at 12:00AM. I extract the difference between those dates (so June 1, 2021 - March 1, 2020 is how many days) and I create the number of milliseconds between them.

Once I have that number of milliseconds, I create a new set of date ranges by applying the milliseconds to March 1, 2020 12:00PM - March 1, 2020 5:00PM to arrive at June 1, 2021 12:00PM - June 1, 2021 5:00PM.

This is all done using the list shifter plugin. Keith explained to me HERE how to use the process list function to create a new date from an existing date.

Because these existing dates that I am operating on come from the database as stored by Bubble (so stored in the Schedule Creators timezone) any manipulation done (adding the milliseconds to arrive at a new date) will manipulate the date in the Schedule Creators timezone and not the current users timezone.

Then once these dates are created using the process list function, I push them into another list shifter to process the list to obtain only the date ranges that are still available and use that processed list to display in a repeating group…it is the display that ‘looks’ like the dates are in the current users timezone but in fact it is still a date range in the Schedule Creators timezone.

I need to test the potential issue of daylight savings, although I suspect it won’t be an issue since I am only finding the total number of days between two dates and using the millisecond representation to create the new date range which leaves the hour and minute values unaffected so when a meeting is scheduled it is saved in the Schedule Creators timezone, which at that point may be during daylight savings time, but would be a non-issue since the meetings date is in that timezone and adjusted by Bubble to be interpreted by the booker to be in their timezone.