blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
19.52k stars 1.8k forks source link

Option to set timezone for event snapshot timestamps #5755

Open ehn opened 1 year ago

ehn commented 1 year ago

Describe what you are trying to accomplish and why in non technical terms Currently, the timezone of timestamps embedded in event snapshots seems to be either UTC or the host timezone. It would be great if it were possible to set this to the actual timezone of the geographical site being surveilled.

Describe the solution you'd like In Frigate 0.12, it is possible to set the timezone of the UI using the timezone setting in the ui section. One solution would be to have that control the timezone of the embedded timestamps, too. Another would be to have a separate setting. I can't think of a scenario where you would want different timezones for those settings, but perhaps one exists.

A third solution would be to have a setting for the geographical site location (coordinates), which Frigate could use to infer various things, including the timezone, but also the position of the sun/moon in the sky and whatnot that could possibly have implications on video surveillance in some future version. (Perhaps this should be a per-camera setting in case people are surveilling vast sites.)

Describe alternatives you've considered Perhaps changing the host timezone would help? However, IMHO, servers should always have their timezone set to UTC regardless of physical location.

Additional context Cf #5018.

martinlindhe commented 1 month ago

I also have this issue, which is exactly that the hardcoded timestampadded to the cropped snapshots produced by frigate contains the time in UTC. Passing timezone data from host only fixes the timestamps shown in the UI.

System logs and file modification times are also in UTC for reasons that I do not understand, but that seems to be a intentional decision by the frigate devs.

Is the UTC timezone in the snapshots also intentional? If so, why?

Frigate 0.14.1-f4f3cfa