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

[Support]: Recordings timeline with wrong event times #3991

Open
dougmaitelli opened this issue Oct 1, 2022 · 19 comments
Open

[Support]: Recordings timeline with wrong event times #3991

dougmaitelli opened this issue Oct 1, 2022 · 19 comments

Comments

@dougmaitelli
Copy link

dougmaitelli commented Oct 1, 2022

Describe the problem you are having

For some reason, on the recordings view, the time on the current date always start at the top as 23:00. The event thumbnails show on the timeline on the right times, but the event recordings show on the wrong times starting from the top.

Example:
image

Current time: 17:00
There is an event at 16:49
The thumbnail shows on the timeline between 16:00 and 17:00

HOWEVER, if I click 16:00 it shows me the recording from 08:00. The actual recording for 16:00 is on 23:00.
Clicking on 23:00 -> shows 16:00
Clicking on 22:00 -> shows 15:00
Clicking on 21:00 -> shows 14:00
Clicking on 20:00 -> shows 13:00
So on...

Again, current time is 17:00, so 20, 21, 22, 23 didn't even have happened yet.

Version

0.11.0

Frigate config file

N/A

Relevant log output

N/A

FFprobe output from your camera

N/A

Frigate stats

{
   "backyard":{
      "camera_fps":5.1,
      "capture_pid":238,
      "detection_fps":5.2,
      "pid":224,
      "process_fps":5.1,
      "skipped_fps":0
   },
   "detection_fps":10.6,
   "detectors":{
      "coral_pci":{
         "detection_start":0,
         "inference_speed":6.83,
         "pid":215
      }
   },
   "front_door":{
      "camera_fps":5.1,
      "capture_pid":236,
      "detection_fps":5.4,
      "pid":222,
      "process_fps":5.1,
      "skipped_fps":0
   },
   "service":{
      "latest_version":"0.11.0",
      "storage":{
         "/dev/shm":{
            "free":247.6,
            "mount_type":"tmpfs",
            "total":268.4,
            "used":20.9
         },
         "/media/frigate/clips":{
            "free":465493.2,
            "mount_type":"zfs",
            "total":536870.9,
            "used":71377.7
         },
         "/media/frigate/recordings":{
            "free":465493.2,
            "mount_type":"zfs",
            "total":536870.9,
            "used":71377.7
         },
         "/tmp/cache":{
            "free":991.6,
            "mount_type":"tmpfs",
            "total":1000,
            "used":8.4
         }
      },
      "temperatures":{
         "apex_0":60.05
      },
      "uptime":677656,
      "version":"0.11.0-3846a13"
   }
}

Operating system

Proxmox

Install method

Docker Compose

Coral version

PCIe

Network connection

Wired

Camera make and model

N/A

Any other information that may be helpful

No response

@NickM-27
Copy link
Sponsor Collaborator

NickM-27 commented Oct 1, 2022

What does your docker compose file look like?

@dougmaitelli
Copy link
Author

dougmaitelli commented Oct 1, 2022

What does your docker compose file look like?

version: "3.9"
services:
  frigate:
    image: blakeblackshear/frigate:stable
    privileged: true
    restart: unless-stopped
    shm_size: '256mb'
    environment:
      FRIGATE_RTSP_PASSWORD: ...
    ports:
      - 5000:5000
      - 1935:1935 # RTMP feeds
    devices:
      - /dev/apex_0:/dev/apex_0
      - /dev/dri/renderD128:/dev/dri/renderD128
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /root/frigate/config.yml:/config/config.yml:ro
      - /mnt/frigate:/media/frigate
      - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
        target: /tmp/cache
        tmpfs:
          size: 1000000000
  double-take:
    image: jakowenko/double-take
    restart: unless-stopped
    ports:
      - 3000:3000
    volumes:
      - /mnt/frigate/double-take:/.storage

@NickM-27
Copy link
Sponsor Collaborator

NickM-27 commented Oct 1, 2022

Does the device running frigate have its timeline set correctly? Localtime is passed through but seems that the time zone is incorrect.

@dougmaitelli
Copy link
Author

Does the device running frigate have its timeline set correctly? Localtime is passed through but seems that the time zone is incorrect.

Yeah, timezone was wrong, just changed it to PST and rebooted and the recordings UI is correct now.

So this fixed my issue, but I still believe there is some issue in the UI, if the event recordings were offset by the timezone, shouldn't the event thumbnails on the timeline also have been offset?

Thanks for the help

@NickM-27
Copy link
Sponsor Collaborator

NickM-27 commented Oct 1, 2022

I wouldn't say it's a bug, the times in the dev are saved as unix and the times shown are coming from the clients time zone.

@dougmaitelli
Copy link
Author

I wouldn't say it's a bug, the times in the dev are saved as unix and the times shown are coming from the clients time zone.

So, the same issue would happen if I access my frigate remotely from a different timezone? (since in that case the browser / client timezone would not match the recordings.

@NickM-27
Copy link
Sponsor Collaborator

NickM-27 commented Oct 1, 2022

I can see some issue with how the event link is different than the hour links.

@blakeblackshear
Copy link
Owner

I plan to have the client pass the timezone to the api so the backend can calculate the recordings response based on that in the future. That will make the timezone on the server irrelevant.

@hawkeye217
Copy link
Collaborator

I plan to have the client pass the timezone to the api so the backend can calculate the recordings response based on that in the future. That will make the timezone on the server irrelevant.

That's great. I've experienced the same issue for a while now on a remote Frigate instance in another time zone. I've just dealt with it knowing that everything in the db is in unix time.

@Strux-DK
Copy link

Strux-DK commented Jan 6, 2024

I think i am also affected by this, but not sure.
When i go to the UI and browse the events, the time is correct and aligns with the time also shown in the recordings. However, when i browse the directories, the time is shifted 1 hour, so the recordings between the hours of 17:00 and 18:00 is in the folder '16'.
Running v. 0.12.1-367d724 add-on in HAOS, please tell me if i need to provide more info or open a separate issue.

@NickM-27
Copy link
Sponsor Collaborator

NickM-27 commented Jan 6, 2024

@Strux-DK no, that is working as designed. The folders are saved in UTC time

@Strux-DK
Copy link

Strux-DK commented Jan 6, 2024

@NickM-27 Why?
Also, i have to ask.. OP attached a photo of his UI as an example. I don't see that in my UI. Is it because OP is running a beta or experimental version?

@NickM-27
Copy link
Sponsor Collaborator

NickM-27 commented Jan 6, 2024

for various reasons, storing in UTC allows frigate to easily convert to any timezone when a user has frigate configured to use the frigate timezone. Also because daylight savings time causes a lot of complications but this does not affect UTC.

You do have this UI, just press recordings on one of the cameras in the main camera page

@Strux-DK
Copy link

Strux-DK commented Jan 6, 2024

@NickM-27 Thank you!

@ehn
Copy link
Sponsor Contributor

ehn commented Feb 5, 2024

Currently, whenever you're accessing Frigate from a timezone different from the site, the recordings view is very confusing (and incorrect). It shows events based on the browser time but videos based on the site time. If you try to find a highlighted event in the video, you won't, because you'll be looking at video from the wrong hour segment.

I can't help but think that this and all other timezone-related issues would go away if the browser timezone was completely ignored. When monitoring video surveillance, I believe in essentially all cases, you care about what the time was at the site when an event happened, not what the time was in whatever location you're viewing the UI from.

@heisenberg2980
Copy link

heisenberg2980 commented Apr 3, 2024

for various reasons, storing in UTC allows frigate to easily convert to any timezone when a user has frigate configured to use the frigate timezone. Also because daylight savings time causes a lot of complications but this does not affect UTC.

You do have this UI, just press recordings on one of the cameras in the main camera page

I think I am experiencing the same issue now after the daylight savings time changed last weekend. When I open any event recorded before Sunday when the time changed, the event is not there. For instance I have an event (car) from last Friday (29th March) at 12:30, and when I click on the event I see the video with the correct time (12:30) but the car is not there, and the event actually happened one hour later, so to see the car I have to manually go to 13:30.

@iursevla
Copy link
Contributor

iursevla commented Apr 4, 2024

@heisenberg2980 yeah same here (GMT+1)

The export date is not according to the date I requested in the exports tab

image

@ehn
Copy link
Sponsor Contributor

ehn commented Jun 19, 2024

The review view in the 0.14 UI ignores the configured timezone and seems to use the browser timezone. Is this considered the same bug as the one discussed in this issue or should a separate issue be opened?

@NickM-27
Copy link
Sponsor Collaborator

I'd say it's the same bug

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

No branches or pull requests

8 participants