mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-04-25 21:57:16 +00:00

* Add new time handling * migrate date for python3.9 * add timedate * add tests & simplify it * better testing * use ssl * use hostname with new interface * expose to API * update data * add base handler * new timezone handling * improve handling * Improve handling * Add tests * Time adjustment function * Fix logging * tweak condition * don't adjust synchronized time * Guard * ignore UTC * small cleanup * like that, we can leaf it * add URL * add comment * Apply suggestions from code review Co-authored-by: Joakim Sørensen <joasoe@gmail.com> Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
18 lines
484 B
Python
18 lines
484 B
Python
"""Testing handling with CoreState."""
|
|
|
|
from supervisor.coresys import CoreSys
|
|
|
|
|
|
async def test_timezone(run_dir, coresys: CoreSys):
|
|
"""Test write corestate to /run/supervisor."""
|
|
|
|
assert coresys.timezone == "UTC"
|
|
assert coresys.config.timezone is None
|
|
|
|
await coresys.dbus.timedate.connect()
|
|
await coresys.dbus.timedate.update()
|
|
assert coresys.timezone == "Etc/UTC"
|
|
|
|
coresys.config.timezone = "Europe/Zurich"
|
|
assert coresys.timezone == "Europe/Zurich"
|