Skip to content

Commit

Permalink
timestamp fix (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlskinneriv authored Apr 7, 2023
1 parent 4733d3c commit 3eddb1f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog],
and this project adheres to [Semantic Versioning].

## [1.1.1] - 2023-04-06

### Fixed

- Bad timestamp format

## [1.1.0] - 2023-04-06

### Added
Expand Down
2 changes: 1 addition & 1 deletion custom_components/awnet_local/helpers_calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def epoch_to_datetime(epoch: int) -> str:
@staticmethod
def mysql_timestamp_to_datetime(mysql_timestamp: str) -> datetime:
try:
return datetime.strptime(mysql_timestamp, "%Y-%m-%d+%H:%M:%S").replace(
return datetime.strptime(mysql_timestamp, "%Y-%m-%d %H:%M:%S").replace(
tzinfo=timezone.utc
)
except Exception as e:
Expand Down

0 comments on commit 3eddb1f

Please sign in to comment.