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

Time Zone Issue in Edit Phase Dialog: Start Time and End Time Cannot be Saved Correctly #1796

Open
hzxie opened this issue Mar 25, 2025 · 10 comments
Labels

Comments

@hzxie
Copy link

hzxie commented Mar 25, 2025

Description

In the "Edit Phase" dialog, the Start Time and End Time fields do not account for time zones and default to UTC. As a result, when I set the End Time to "31 Mar 12:00 AM" in my local time, it is displayed incorrectly upon loading the page. Specifically, the time shows as "30 Mar 4:00 PM." After saving, I receive a "Phase Errors" message. When reopening the dialog, the End Time is displayed as "30 Mar 8:00 AM."

Steps to Reproduce

  • Set timezone to UTC.
  • Open the "Edit Phase" dialog.
  • Set the End Time to "31 Mar 12:00 AM" in the local time.
  • Save.
  • Set timezone to UTC+8.
  • Load the page again.
  • Observe that the End Time changes to "30 Mar 4:00 PM". (Screenshot 1)
  • Save.
  • A "Phase Errors" message appears. (Screenshot 2)
  • Reopen the "Edit Phase" dialog and notice that the End Time is now "30 Mar 8:00 AM". (Screenshot 3)

If you're having trouble understanding, please watch the video below, rather than closing the issue and stating that this is not a bug.

bandicam.2025-03-27.09-47-38-342.mp4

Screenshots

Image Image Image
@ihsaan-ullah
Copy link
Collaborator

ihsaan-ullah commented Mar 26, 2025

Image

You are supposed to select a time in UTC time and not in your local time. e.g. If you are in UTC+5, you should select a time that is 5 hours earlier than your time. If you do this, do you still see any issue?

@hzxie
Copy link
Author

hzxie commented Mar 26, 2025

Please reply to me before reading "Steps to Reproduce". Thanks!
I have told you how to reproduce this issue. Try to change to other timezones instead of UTC. Then you will know this issue.

@Didayolo
Copy link
Member

Didayolo commented Mar 26, 2025

@hzxie

I could not reproduce this bug.

When I change the timezone, refresh the page and come back to the editor, the time are still consistently 12am UTC.

Expected Behavior
The Start Time and End Time should properly account for the local time zone and not default to UTC. The times should remain consistent and display correctly when saved and loaded again.

This is NOT the expected behavior. The start time and end time settings should always be stored and display in UTC time to avoid any confusion. They should indeed remain consistent when saving and loading the page again, which seems to be the case from my tests.

@Didayolo
Copy link
Member

By the way, if you are seeing the error message about conflicting phases dates, you are not able to save. That may explain why the values appear to change.

I'm closing this issue, feel free to add more information or re-open it if you feel like the problem you are reporting does actually exist.

@hzxie
Copy link
Author

hzxie commented Mar 27, 2025

THIS BUG DOES EXIST. Please reopen this issue.
Try to reproduce the issue by setting your timezone to UTC+8 (or any timezone other than UTC).

The video below shows that even when I select the time in the UTC timezone, it still does not work.
The test phase will end on 28 March 2025 at 12:00 AM (UTC+8), which is equivalent to 27 March 2025 at 4:00 PM (GMT).
When I save it in the dialog, the end time automatically changes to 27 March 2025 at 8:00 AM (GMT), and then this error occurs.

bandicam.2025-03-27.09-57-28-076.mp4

The video below demonstrates the "Steps to Reproduce".
This error is essentially caused by the same issue described above.

bandicam.2025-03-27.09-47-38-342.mp4

@hzxie hzxie changed the title Time Zone Issue in Edit Phase Dialog: Start Time and End Time Default to UTC [CARELESS CLOSURE BY MAINTAINERS] Time Zone Issue in Edit Phase Dialog: Start Time and End Time Default to UTC Mar 27, 2025
@hzxie hzxie changed the title [CARELESS CLOSURE BY MAINTAINERS] Time Zone Issue in Edit Phase Dialog: Start Time and End Time Default to UTC [DEFINITELY BUG. REOPEN IT] Time Zone Issue in Edit Phase Dialog: Start Time and End Time Default to UTC Mar 27, 2025
@hzxie hzxie changed the title [DEFINITELY BUG. REOPEN IT] Time Zone Issue in Edit Phase Dialog: Start Time and End Time Default to UTC [DEFINITELY BUG. REOPEN IT] Time Zone Issue in Edit Phase Dialog: Start Time and End Time Cannot be Saved Correctly Mar 27, 2025
@Didayolo Didayolo reopened this Mar 27, 2025
@Didayolo
Copy link
Member

We'll examinate this issue, thanks for the details.

@Didayolo Didayolo changed the title [DEFINITELY BUG. REOPEN IT] Time Zone Issue in Edit Phase Dialog: Start Time and End Time Cannot be Saved Correctly Time Zone Issue in Edit Phase Dialog: Start Time and End Time Cannot be Saved Correctly Mar 27, 2025
@Didayolo Didayolo added the Bug label Mar 27, 2025
@cl4yton
Copy link

cl4yton commented Mar 27, 2025

For what it is worth, I can report that I am having the same problem. When creating a Phase, when I set the Start Time and End Time (assuming UTC-0), save, and then go back to Edit the Phase, the Start Time and End Time have been changed to different values that I did not enter.

@ihsaan-ullah
Copy link
Collaborator

I can reproduce this problem. We will check and fix it soon

@cl4yton for now you can select the time in UTC-0 and save the competition. This will save the correct times. Going back to edit phase before saving indeed shows incorrect times that we will check.

@ihsaan-ullah
Copy link
Collaborator

ihsaan-ullah commented Mar 28, 2025

@hzxie what date and time in UTC+0 do you want to set for the Test Phase of your competition? I tried changing the date/time in your competition but the dates were locked as reported in #1793.

@hzxie
Copy link
Author

hzxie commented Mar 28, 2025

PLEASE DO NOT CHANGE MY DATE/TIME OF MY COMPLETION. This is an online competition.
I have already set the expected time by setting my timezone to UTC.

Actually, the bug you mentioned is a different one (which I haven't reported). This issue can be manually fixed by clearing the current date by deleting the content in the textbox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants