Welcome to the JavaScript feedback portal. We’re happy you’re here! If you have feedback on how to improve the JavaScript, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

Hello,

at first, i am not sure about the version number. I think it's ej2-base 17.1.49 or util.js.

You can see the timezone problem with UrlAdapter. A common fix is to set serverTimezoneOffset but this is not possible with daylight saving time.


Working example without UrlAdaptor. Instead a local json file is used:

https://wbtagw.stackblitz.io

You can see 3 events. All events are at 16:30 German time. 

Event 1 is at normal time. (UTC 15:30: CET: 16:30)

Event 3 is at summer time. (UTC 14:30: CEST: 16:30)

Event 2 is also at UTC 15:30, the timezone is London. Since the schedule is at Europe/Berlin 16:30 is correct.


If you use the UrlAdapter, there is some timezone calculation. I think it's wrong.

At first "jsonReviver" takes the time from the json object but ignores the timezone and uses the local timezone:

Event 1: 15:30 CET, offset -60

Event 3: 14:30 CEST, offset -120


"toTimeZone" uses "toUTC" to get the UTC time. But the result is:

Event 1: 14:30 CET

Event 3: 12:30 CEST

And now, the serverTimezoneOffset is substracted from the times.

For Event 1 the serverTimezoneOffset has to be 2.

For Event 3 the serverTimezoneOffset has to be 4.


Here is a test case:

https://7hkte9.stackblitz.io/

Both events should be at 5 PM in the schedule.

30.03: 4 PM UTC ( = 5 PM CET)

31.03: 3 PM UTC ( = 5 PM CEST)