core/homeassistant/components/sql
J. Nick Koston 4366f83ac8
Restore use of local timezone for MariaDB/MySQL in SQL integration (#91313)
* Use local timezone for recorder connection

The fix in #90335 had an unexpected side effect of
using UTC for the timezone since all recorder operations
use UTC. Since only sqlite much use the database executor
we can use a seperate connection pool which uses local time

This also ensures that the engines are disposed of
when Home Assistant is shutdown as previously we
did not cleanly disconnect

* coverage

* fix unclean shutdown in config flow

* tweaks
2023-04-12 20:24:55 -04:00
..
__init__.py
config_flow.py Restore use of local timezone for MariaDB/MySQL in SQL integration (#91313) 2023-04-12 20:24:55 -04:00
const.py
manifest.json Bump sqlalchemy to 2.0.9 (#91151) 2023-04-10 10:01:49 -04:00
models.py Restore use of local timezone for MariaDB/MySQL in SQL integration (#91313) 2023-04-12 20:24:55 -04:00
sensor.py Restore use of local timezone for MariaDB/MySQL in SQL integration (#91313) 2023-04-12 20:24:55 -04:00
strings.json Raise an issue for legacy SQL queries that will cause full table scans (#90971) 2023-04-07 22:32:36 -04:00
util.py