-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timezone issues after change of winter to summer time in Europe #8690
Comments
I want to work in this as i'm new i want gain some experience |
/assign @Leslie-Wong-H |
Similar issue related: moment/moment-timezone#723 |
As for the winter time problem. It seems it is caused by the way how Google Calendar (& Outlook as well) treat the UTC time string information together with location/timezone. Take this as an example, https://eventyay.com/e/02440ae2 The time string got from backend is
let dateTime = moment(params[0]).tz(timezone).format(format); But when it comes to Google Calendar, the URL to create event is like this, https://calendar.google.com/calendar/u/0/r/eventedit?dates=20230526T160000Z/20230527T180000Z&text=Timezone+Test&location=https://eventyay.com/e/02440ae2&ctz=Europe/Berlin. Notice the Unexpectedly, it shifts the time one hour later, probably because of their design mechanism of Daylights Savings Time. Need more elaboration about the underlying behaviors that moment.js handles DST. |
Valuable documentation about Google Calendar URL Calendar URL generator which parameters -Google Calendar Help add-event-to-calendar-docs/services/google.md The source code that eventyay uses to visit Google Calendar:
|
Tricky enough. get startsAt(): Moment {
const { event } = this.args;
return moment(event.startsAt).tz(event.timezone);
}
get endsAt(): Moment {
const { event } = this.args;
return moment(event.endsAt).tz(event.timezone);
}
get calendarLocation(): string {
return this.args.event.online ? this.args.event.url : this.args.location;
}
get googleUrl(): string {
const { event } = this.args;
const startTime = this.startsAt.utc().format('YYYYMMDD[T]HHmmSS[Z]');
const endTime = this.endsAt.utc().format('YYYYMMDD[T]HHmmSS[Z]');
return `https://calendar.google.com/calendar/render?action=TEMPLATE&dates=${startTime}/${endTime}&text=${event.name}&location=${this.calendarLocation}&ctz=${event.timezone}&details=${this.description}`;
} |
A StackOverflow answer to
https://stackoverflow.com/a/5495816/8808175 Since eventyay seemingly uses server-side UTC-0 time to mark timestamps with timezone, I doubt the feasibility to fix this bug. |
Pardon, it should have a workaround. |
If It's giving timestamp error maybe cause of node is not updated? |
Why 'node'? It's the browser environment. |
I thought hence we are using Google timestamp so there are updated all systems and ours is not so maybe some errors is occurring? And we also got new issue to update node cause some test and function giving errors |
@Leslie-Wong-H will you be working on this? |
I want to work on this. Please assign it to me |
We don't assign issues to external contributors. Please comment that you're working on the issue after checking that no one else is, and then send a pull request for it. Thank You! |
I am working on this issue. |
The mis-logic of this issue is this way. Referring to https://clocks.world/time/germany/berlin/, since March 26 2023, the CET time that Berlin adopts is 2 hours ahead of UTC0, and the status quo here is that Inspiration: Find the core code that eventyay uses to generate event time string to post to server and use the DST-safe Temporal Polyfill to ensure the utc0 correctness. Or figure out why moment-timezone is not handling utc0 correctly. |
* Update moment-timezone to the latest * Stick to using moment-timezone to fix DST (#8690) --------- Co-authored-by: cweitat <cweitat@gmail.com>
The time is not displayed correctly. When a user creates an event in Berlin Germany, the event uses the winter time. Adding the event to Google calendar will result in the event being in another time than displayed on the website.
Also changing the timezone to GMT+1 suddenly displays GMT-1 on the public event page.
Expected: The timezone of the event should always correspond to the timezone of the event day. If an event is created during when the winter timezone is active but the event itself is on a date when the time is summer timezone the event time should use summer time.
The text was updated successfully, but these errors were encountered: