nextcloud / nextcloud/calendar
Appointment availability intervals are generate in browser time zone and not calendar time zone
@SebastianKrupinski is already working on this.
Since Nov 27, 2024.
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 332
- Avg merge
- 16h 13m
- Merged PRs (30d)
- 137
Description
Steps to reproduce
- Change calendar to a different time zone then the browser time zone (Calendar: Europe/Berlin, Browser: America/Toronto)
- Create new appointment schedule (Mon to Fri, 9am to 5pm)
- Check appointment slots for schedule (use link)
Expected behavior
Appointment availability intervals should be created with calendar time zone
Actual behaviour
Appointment availability intervals are created with the browsers time zone
Calendar app version
Main
Test Results
Appointment availability Intervals created with:
Calendar set to Europe/Berlin
Browser set to America/Toronto
Time set to 9am to 5pm
{
"timezoneId": "Europe\/Berlin",
"slots": {
"MO": [
{
"start": 1732543200,
"end": 1732572000
}
],
"TU": [
{
"start": 1732543200,
"end": 1732572000
}
],
"WE": [
{
"start": 1732543200,
"end": 1732572000
}
],
"TH": [
{
"start": 1732543200,
"end": 1732572000
}
],
"FR": [
{
"start": 1732543200,
"end": 1732572000
}
],
"SA": [],
"SU": []
}
}
Epoch conversion for Monday start in Europe/Berlin
1732543200 converts to Monday November 25, 2024 15:00:00 (pm) in time zone Europe/Berlin (CET)
Epoch conversion for Monday start in America/Toronto
1732543200 converts to Monday November 25, 2024 09:00:00 (am) in time zone America/Toronto (EST)
Issue
Appointment availability intervals are created with the browsers time zone and not the calendars.
A secondary issue is that epoch is a static number of seconds from a specific start point and defines a different time for every time zone. Epoch time will also differ during Standard and Daylight Savings time.
Solution
Use seconds from start of day for availability intervals
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.