ep1cman / unifi-protect-backup

Python tool to backup unifi event clips in realtime
MIT License
577 stars 25 forks source link

Container install not using container's TZ #65

Open Swallowtail23 opened 1 year ago

Swallowtail23 commented 1 year ago

Description

I have podman (docker) set to use my local timezone, and the logging shows that is working but UPB's logging uses only UTC - note container log entry on the following line with UPB then appending UTC: 2022-12-12T11:37:41.962213664+10:00 stderr F 2022-12-12 01:37:41 [ INFO ] unifi_protect_backup.unifi_protect_backup : Starting... Can UPB use the container's TZ instead of UTC?

mmolitor87 commented 2 months ago

I have my docker container set to use an environment variable such as - TZ=America/Chicago and it works just fine.

e36Alex commented 2 months ago

I mounted the host config as a volume:


- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
´´´