mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-24 07:21:09 -04:00
Implement generateTimeslot() for recurring interval type
This commit is contained in:
parent
8cc3e4b7c1
commit
2faf866e9e
6 changed files with 87 additions and 24 deletions
|
@ -671,18 +671,20 @@ function timeObjectConvertTimezone(obj, timezone, timeObjectToUTC = true) {
|
|||
obj.minutes += minutes;
|
||||
|
||||
// Handle out of bound
|
||||
if (obj.minutes < 0) {
|
||||
obj.minutes += 60;
|
||||
obj.hours--;
|
||||
} else if (obj.minutes > 60) {
|
||||
obj.minutes -= 60;
|
||||
obj.hours++;
|
||||
}
|
||||
|
||||
if (obj.hours < 0) {
|
||||
obj.hours += 24;
|
||||
} else if (obj.hours > 24) {
|
||||
obj.hours -= 24;
|
||||
}
|
||||
|
||||
if (obj.minutes < 0) {
|
||||
obj.minutes += 24;
|
||||
} else if (obj.minutes > 24) {
|
||||
obj.minutes -= 24;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue