Skip to content
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

Appointment slots are generated for the wrong day due to UI sending date in epoch #6528

Open
SebastianKrupinski opened this issue Nov 27, 2024 · 0 comments · May be fixed by #6532
Open

Appointment slots are generated for the wrong day due to UI sending date in epoch #6528

SebastianKrupinski opened this issue Nov 27, 2024 · 0 comments · May be fixed by #6532
Assignees
Labels
1. to develop Accepted and waiting to be taken care of bug

Comments

@SebastianKrupinski
Copy link
Contributor

SebastianKrupinski commented Nov 27, 2024

Steps to reproduce

  1. Create appointment schedule in local time zone (Europe/Berlin) UTC+1
  2. Change browser time zone to (Asia/Jerusalem) UTC+2
  3. Select a date e.g. 2024-11-26

Expected behavior

Should show slots for 2024-11-26

Actual behaviour

Shows slots for 2024-11-25

Calendar app version

Main

Test Results

Selected November 26, 2024 in Asia/Jerusalem which is epoch 1732579200000.

Epoch conversion for Asia/Jerusalem time zone

1732579200000 converts to November 26, 2024 00:00:00 (am) in time zone Asia/Jerusalem (IST)

Epoch conversion for Europe/Berlin

1732579200000  converts to November 25, 2024 23:00:00 (pm) in time zone Europe/Berlin (CET)

Epoch conversion for America/Toronto

1732579200000  converts to November 25, 2024 19:00:00 (pm) in time zone America/Toronto (EST)

Issue

UI sends the date in the browsers time zone as epoch without sending the actual time zone. The issue is that epoch is a static number of seconds from a specific start point and defines a different time for every time zone, so once the configuration time zone is applied to the date, this causes the date to roll back one day causing slots to be generated for the wrong date. Epoch time will also differ during Standard and Daylight Savings time.

Solution

Use string date instead of epoch time stamp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

1 participant