mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-30 11:54:52 +03:00
Fix EU DST bug (#22698)
Some checks are pending
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
Some checks are pending
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
This commit is contained in:
parent
953d244c52
commit
f0a6626c6a
@ -249,10 +249,9 @@ class PreviewRecorder:
|
|||||||
"v2": v2,
|
"v2": v2,
|
||||||
}
|
}
|
||||||
|
|
||||||
# end segment at end of hour
|
# end segment at end of hour (use UTC to avoid DST issues)
|
||||||
self.segment_end = (
|
self.segment_end = (
|
||||||
(datetime.datetime.now() + datetime.timedelta(hours=1))
|
(datetime.datetime.now(datetime.timezone.utc) + datetime.timedelta(hours=1))
|
||||||
.astimezone(datetime.timezone.utc)
|
|
||||||
.replace(minute=0, second=0, microsecond=0)
|
.replace(minute=0, second=0, microsecond=0)
|
||||||
.timestamp()
|
.timestamp()
|
||||||
)
|
)
|
||||||
@ -264,8 +263,7 @@ class PreviewRecorder:
|
|||||||
|
|
||||||
# check for existing items in cache
|
# check for existing items in cache
|
||||||
start_ts = (
|
start_ts = (
|
||||||
datetime.datetime.now()
|
datetime.datetime.now(datetime.timezone.utc)
|
||||||
.astimezone(datetime.timezone.utc)
|
|
||||||
.replace(minute=0, second=0, microsecond=0)
|
.replace(minute=0, second=0, microsecond=0)
|
||||||
.timestamp()
|
.timestamp()
|
||||||
)
|
)
|
||||||
@ -299,8 +297,10 @@ class PreviewRecorder:
|
|||||||
|
|
||||||
def reset_frame_cache(self, frame_time: float) -> None:
|
def reset_frame_cache(self, frame_time: float) -> None:
|
||||||
self.segment_end = (
|
self.segment_end = (
|
||||||
(datetime.datetime.now() + datetime.timedelta(hours=1))
|
(
|
||||||
.astimezone(datetime.timezone.utc)
|
datetime.datetime.fromtimestamp(frame_time, tz=datetime.timezone.utc)
|
||||||
|
+ datetime.timedelta(hours=1)
|
||||||
|
)
|
||||||
.replace(minute=0, second=0, microsecond=0)
|
.replace(minute=0, second=0, microsecond=0)
|
||||||
.timestamp()
|
.timestamp()
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user