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

Maintenance start/end time input incorrectly uses system timezone #4066

Closed
2 tasks done
lougedada opened this issue Nov 20, 2023 · 5 comments · Fixed by #4186
Closed
2 tasks done

Maintenance start/end time input incorrectly uses system timezone #4066

lougedada opened this issue Nov 20, 2023 · 5 comments · Fixed by #4186
Labels
area:maintenance related to the maintenance mode bug Something isn't working good first issue Good for newcomers

Comments

@lougedada
Copy link

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ Security Policy

Description

image
image
I set the Chinese time, but after exiting, the time displayed was 1 hour later than the set time, but the actual execution time was correct.

👟 Reproduction steps

Select the time zone as Shanghai and set up planned maintenance

👀 Expected behavior

Time display leading to status page errors

😓 Actual Behavior

Status page error time display

🐻 Uptime-Kuma Version

1.23.6

💻 Operating System and Arch

Ubuntu 22.04.3 LTS

🌐 Browser

edge

🐋 Docker Version

Docker version 24.0.5, build 24.0.5-0ubuntu1~22.04.1

🟩 NodeJS Version

No response

📝 Relevant log output

No response

@lougedada lougedada added the bug Something isn't working label Nov 20, 2023
@CommanderStorm
Copy link
Collaborator

Could you try restarting your instance as noted in #3626

@lougedada
Copy link
Author

Could you try restarting your instance as noted in #3626

image
I am using this model. It is okay if I try according to the model in the article you mentioned, but the single time model is wrong.

@imlonghao
Copy link

imlonghao commented Nov 29, 2023

I'm able to reproduce this issue. IT IS RELATED TO YOUR BROWSER/SYSTEM TIMEZONE.

Let's say we have a planned maintenance on 2023-11-30 10:00-11:00 (UTC+8), aka 2023-11-30 11:00-12:00 (UTC+9)

How to reproduce:

  1. Change your system timezone to Asia/Tokyo (UTC+9)
  2. Go to https://demo.uptime.kuma.pet/ and create a demo instance
  3. Create a New Monitor, whatever target is ok
  4. Go to Schedule Maintenance and create a maintenance as the screenshot
    image
  5. Now you can see from the list, the maintenance is shown as 2023-11-30 09:00 - 2023-11-30 10:00 UTC+08:00 Asia/Shanghai, which is an hour earlier than expected.
    image

Related to this code block:

computed: {
startDateTime() {
return dayjs(this.maintenance.timeslotList[0].startDate).tz(this.maintenance.timezone).format(SQL_DATETIME_FORMAT_WITHOUT_SECOND);
},
endDateTime() {
return dayjs(this.maintenance.timeslotList[0].endDate).tz(this.maintenance.timezone).format(SQL_DATETIME_FORMAT_WITHOUT_SECOND);
}
},

@chakflying chakflying changed the title Scheduled maintenance shows wrong time Maintenance start/end time input incorrectly uses system timezone Nov 30, 2023
@chakflying chakflying added the good first issue Good for newcomers label Nov 30, 2023
@jaybhanushali3166
Copy link
Contributor

Hi @chakflying / @CommanderStorm,
I'd be interested to work on this bug. May you please assign it to me?

@chakflying
Copy link
Collaborator

I don't think this issue is complicated enough to require assignment, and we don't assign issues here in general. If you have a solution you can open a pull request following the guidelines.

@CommanderStorm CommanderStorm added the area:maintenance related to the maintenance mode label Dec 5, 2023
Ritik0102 added a commit to Ritik0102/uptime-kuma that referenced this issue Dec 7, 2023
louislam pushed a commit to Ritik0102/uptime-kuma that referenced this issue Dec 9, 2023
@louislam louislam closed this as completed Dec 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:maintenance related to the maintenance mode bug Something isn't working good first issue Good for newcomers
Projects
None yet
6 participants