I have a big issue with timezones when using the GetOccurrences method in my ASP.NET controller.
I have a server where I store schedule start and end in UTC. Then I have a method where I check if the schedule is playing right now. I use the scheduler in the view and choose for instance the recurring pattern: Weekly -> Wednesday -> No end date - Time period: 00:00 19 November - 06:00 19 November
The problem is that when I schedule something for every Wednesday from 00:00 to 06:00 and I’m located in Norway the value will be stored in UTC which is 23:00 in the database. This works fine in the view client side where the scheduler know that the schedules rendered are stored in UTC and display local time. But the .NET GetOccurrences method in the controller does not have this information and translates the recurring pattern and startdate information to be every Wednesday from 23:00 to 05:00 the morning after. While it should have been every Wednesday from 00:00 to 06:00, It skips a whole day.
I can therefore not get the occurrences of that schedule in my controller. This will be a big problem if I use the scheduler across different timezones. How can I fix this?