mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Fix current hour check for uneven timezones (#11484)
This commit is contained in:
parent
9652ea9e96
commit
db496ec525
@ -302,5 +302,8 @@ export function getEndOfDayTimestamp(date: Date) {
|
||||
export function isCurrentHour(timestamp: number) {
|
||||
const now = new Date();
|
||||
now.setMinutes(0, 0, 0);
|
||||
return timestamp > now.getTime() / 1000;
|
||||
|
||||
const timeShift = getTimestampOffset(timestamp);
|
||||
|
||||
return timestamp > now.getTime() / 1000 + timeShift;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user