Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! fixup! fixup! feat: add date logic
Browse files Browse the repository at this point in the history
  • Loading branch information
vanstinator committed Mar 25, 2022
1 parent e5f7f0c commit 57a0841
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions melnor_bluetooth/parser/date.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import datetime
from zoneinfo import ZoneInfo
import zoneinfo


def _time_offset(tz: datetime.tzinfo = datetime.timezone.utc):
Expand All @@ -13,7 +13,9 @@ def _time_offset(tz: datetime.tzinfo = datetime.timezone.utc):
All watering operations are keyed off this value and the mobile app _and valves_ will show bad info we don't replicate the algorithm
"""

base_time = datetime.datetime.now(tz=ZoneInfo("Asia/Shanghai"))
print(zoneinfo.available_timezones)

base_time = datetime.datetime.now(tz=zoneinfo.ZoneInfo("Asia/Shanghai"))
local_time = datetime.datetime.now(tz)

base_offset = base_time.utcoffset()
Expand Down

0 comments on commit 57a0841

Please sign in to comment.