Merge branch 'bug/backup-tz' into 'dev'

Fix backups failing by correctly using tz objects

See merge request crafty-controller/crafty-4!556
This commit is contained in:
Iain Powrie 2023-02-11 19:26:37 +00:00
commit 9abdb47d31
2 changed files with 4 additions and 1 deletions

View File

@ -6,6 +6,7 @@
### Bug fixes
- Fix exception related to page data on server start ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/544))
- Fix logical issue with uploading dynamic files ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/555))
- Fix backups failing by correctly using tz objects ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/556))
### Tweaks
- Cleanup authentication helpers ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/545))
- Optimize file upload progress WS ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/546))

View File

@ -12,6 +12,8 @@ import html
import urllib.request
import glob
from zoneinfo import ZoneInfo
# TZLocal is set as a hidden import on win pipeline
from tzlocal import get_localzone
from tzlocal.utils import ZoneInfoNotFoundError
@ -136,7 +138,7 @@ class ServerInstance:
logger.error(
"Could not capture time zone from system. Falling back to Europe/London"
)
self.tz = "Europe/London"
self.tz = ZoneInfo("Europe/London")
self.server_scheduler = BackgroundScheduler(timezone=str(self.tz))
self.server_scheduler.start()
self.backup_thread = threading.Thread(