Skip to content

Improve time format support#32

Open
tomer-w wants to merge 2 commits into
chomupashchuk:masterfrom
tomer-w:master
Open

Improve time format support#32
tomer-w wants to merge 2 commits into
chomupashchuk:masterfrom
tomer-w:master

Conversation

@tomer-w

@tomer-w tomer-w commented Oct 1, 2024

Copy link
Copy Markdown

Instead of accepting only seconds we now support more formats based on the django parse_duration function which is already used in Home Assistant.

Expects data in the format "DD HH:MM:SS.uuuuuu", "DD HH:MM:SS,uuuuuu", or as specified by ISO 8601 (e.g. P4DT1H15M20S which is equivalent to 4 1:15:20) or PostgreSQL’s day-time interval format (e.g. 3 days 04:05:06).

While doing so I improved tracing a bit and did minor change in the structure of the code which looks bad in diff but actual really minimal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant