my.calendar.holidays: unhardcode calendar, detect it from the location data
This commit is contained in:
parent
bdb5dcd221
commit
96113ad5ae
5 changed files with 49 additions and 7 deletions
|
@ -119,6 +119,7 @@ def _get_home_tz(loc) -> Optional[pytz.BaseTzInfo]:
|
|||
return pytz.timezone(zone)
|
||||
|
||||
|
||||
# TODO expose? to main as well?
|
||||
def _get_tz(dt: datetime) -> Optional[pytz.BaseTzInfo]:
|
||||
res = _get_day_tz(d=dt.date())
|
||||
if res is not None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue