Skip to content

Commit

Permalink
Fix Onvif get_time_zone from device (home-assistant#51620)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Hjelmare <[email protected]>
  • Loading branch information
pszafer and MartinHjelmare authored Jun 8, 2021
1 parent 79da2bc commit abbd4d1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion homeassistant/components/onvif/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ async def async_check_date_and_time(self) -> None:
cdate = device_time.UTCDateTime
else:
tzone = (
dt_util.get_time_zone(device_time.TimeZone)
dt_util.get_time_zone(
device_time.TimeZone or str(dt_util.DEFAULT_TIME_ZONE)
)
or dt_util.DEFAULT_TIME_ZONE
)
cdate = device_time.LocalDateTime
Expand Down

0 comments on commit abbd4d1

Please sign in to comment.