Skip to content

fix: handle 24:00:00 time string from GivEnergy Cloud#3652

Merged
springfall2008 merged 1 commit intomainfrom
fix/24-hour-time-parsing
Mar 25, 2026
Merged

fix: handle 24:00:00 time string from GivEnergy Cloud#3652
springfall2008 merged 1 commit intomainfrom
fix/24-hour-time-parsing

Conversation

@mgazza
Copy link
Collaborator

@mgazza mgazza commented Mar 25, 2026

Summary

Test plan

  • Verify time_string_to_stamp("24:00:00") returns datetime(1900, 1, 1, 0, 0)
  • Verify normal time strings still parse correctly
  • Verify GivEnergy users with discharge end = midnight no longer crash

GivEnergy Cloud returns "24:00:00" for discharge_end_time (meaning
midnight/end of day). This is valid ISO 8601 but crashes strptime.
Normalise to "00:00:00" before parsing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mgazza mgazza requested a review from springfall2008 March 25, 2026 05:34
@springfall2008 springfall2008 merged commit 926985d into main Mar 25, 2026
1 check passed
@springfall2008 springfall2008 deleted the fix/24-hour-time-parsing branch March 25, 2026 08:47
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.

time_string_to_stamp crashes on 24:00:00 from GivEnergy Cloud

2 participants