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

Use UTC for recordings #4656

Merged
merged 15 commits into from
Dec 11, 2022
Merged

Conversation

NickM-27
Copy link
Collaborator

@NickM-27 NickM-27 commented Dec 9, 2022

The nginx vod module makes query parameters very difficult so I added a path param instead. Could likely be reworked when removing the vod module.

@netlify
Copy link

netlify bot commented Dec 9, 2022

Deploy Preview for frigate-docs canceled.

Name Link
🔨 Latest commit 33aedba
🔍 Latest deploy log https://app.netlify.com/sites/frigate-docs/deploys/639512072f9939000a586cd5

frigate/http.py Show resolved Hide resolved
web/src/routes/Recording.jsx Outdated Show resolved Hide resolved
@blakeblackshear
Copy link
Owner

The changes to the folder structure will be a breaking change for viewing recordings in the media browser integration in HA. On the bright side, we should be able to simplify that code because it still relies on parsing the directory structure and we can now provide APIs given the recordings info is in the database.

@blakeblackshear blakeblackshear merged commit 037f376 into blakeblackshear:dev Dec 11, 2022
@NickM-27 NickM-27 deleted the utc-files branch December 11, 2022 14:16
@singingtelegram
Copy link
Contributor

singingtelegram commented Dec 30, 2022

I'm receiving a pytz.exceptions.UnknownTimeZoneError error when viewing recordings since the code replaced the underscore in the actual time zone (America/Los_Angeles) with a slash.

frigate    | 2022-12-29 20:44:48.241651153  [2022-12-29 20:44:48] frigate.http                   ERROR   : Exception on /vod/2022-mm/dd/hh/name/America_Los_Angeles [GET]
frigate    | 2022-12-29 20:44:48.241652946  Traceback (most recent call last):
frigate    | 2022-12-29 20:44:48.241654058    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 2525, in wsgi_app
frigate    | 2022-12-29 20:44:48.241654789      response = self.full_dispatch_request()
frigate    | 2022-12-29 20:44:48.241655531    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1822, in full_dispatch_request
frigate    | 2022-12-29 20:44:48.241656122      rv = self.handle_user_exception(e)
frigate    | 2022-12-29 20:44:48.241656863    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1820, in full_dispatch_request
frigate    | 2022-12-29 20:44:48.241657404      rv = self.dispatch_request()
frigate    | 2022-12-29 20:44:48.241658136    File "/usr/local/lib/python3.9/dist-packages/flask/app.py", line 1796, in dispatch_request
frigate    | 2022-12-29 20:44:48.241658817      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
frigate    | 2022-12-29 20:44:48.241659468    File "/opt/frigate/frigate/http.py", line 1101, in vod_hour
frigate    | 2022-12-29 20:44:48.241660190      int(parts[0]), int(parts[1]), int(day), int(hour), tzinfo=pytz.timezone(tz_name)
frigate    | 2022-12-29 20:44:48.241660891    File "/usr/local/lib/python3.9/dist-packages/pytz/__init__.py", line 188, in timezone
frigate    | 2022-12-29 20:44:48.241661472      raise UnknownTimeZoneError(zone)
frigate    | 2022-12-29 20:44:48.241662073  pytz.exceptions.UnknownTimeZoneError: 'America/Los/Angeles'

@NickM-27
Copy link
Collaborator Author

Thanks, I didn't consider that which was short-sighted. I'll fix that tomorrow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants