mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2026-03-12 09:36:17 +00:00
fix: pydantic datetime dataframe timezone conversion (#927)
Some checks failed
Close stale pull requests/issues / Find Stale issues and PRs (push) Has been cancelled
Bump Version / Bump Version Workflow (push) Has been cancelled
docker-build / platform-excludes (push) Has been cancelled
pre-commit / pre-commit (push) Has been cancelled
Run Pytest on Pull Request / test (push) Has been cancelled
docker-build / build (push) Has been cancelled
docker-build / merge (push) Has been cancelled
Some checks failed
Close stale pull requests/issues / Find Stale issues and PRs (push) Has been cancelled
Bump Version / Bump Version Workflow (push) Has been cancelled
docker-build / platform-excludes (push) Has been cancelled
pre-commit / pre-commit (push) Has been cancelled
Run Pytest on Pull Request / test (push) Has been cancelled
docker-build / build (push) Has been cancelled
docker-build / merge (push) Has been cancelled
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
# the root directory (no add-on folder as usual).
|
||||
|
||||
name: "Akkudoktor-EOS"
|
||||
version: "0.2.0.dev2603032000228213"
|
||||
version: "0.2.0.dev2603071785688456"
|
||||
slug: "eos"
|
||||
description: "Akkudoktor-EOS add-on"
|
||||
url: "https://github.com/Akkudoktor-EOS/EOS"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Akkudoktor-EOS
|
||||
|
||||
**Version**: `v0.2.0.dev2603032000228213`
|
||||
**Version**: `v0.2.0.dev2603071785688456`
|
||||
|
||||
<!-- pyml disable line-length -->
|
||||
**Description**: This project provides a comprehensive solution for simulating and optimizing an energy system based on renewable energy sources. With a focus on photovoltaic (PV) systems, battery storage (batteries), load management (consumer requirements), heat pumps, electric vehicles, and consideration of electricity price data, this system enables forecasting and optimization of energy flow and costs over a specified period.
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"name": "Apache 2.0",
|
||||
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
},
|
||||
"version": "v0.2.0.dev2603032000228213"
|
||||
"version": "v0.2.0.dev2603071785688456"
|
||||
},
|
||||
"paths": {
|
||||
"/v1/admin/cache/clear": {
|
||||
|
||||
@@ -1136,9 +1136,13 @@ class PydanticDateTimeDataFrame(PydanticBaseModel):
|
||||
data_tz = cls._detect_data_tz(df)
|
||||
|
||||
if tz is not None:
|
||||
if data_tz and data_tz != tz:
|
||||
raise ValueError(f"Timezone mismatch: tz='{tz}' but data uses '{data_tz}'")
|
||||
resolved_tz = tz
|
||||
if data_tz and data_tz != tz:
|
||||
warning_msg = (
|
||||
f"Forcing Pydantic dataframe timezone to '{resolved_tz}' - "
|
||||
f"data timezone was '{data_tz}'."
|
||||
)
|
||||
logger.warning(warning_msg)
|
||||
else:
|
||||
if data_tz:
|
||||
resolved_tz = data_tz
|
||||
|
||||
Reference in New Issue
Block a user