From 2a85be4cc8237292dfbb5ee96e445800a148b0f5 Mon Sep 17 00:00:00 2001 From: Chris Mackey Date: Tue, 14 Jul 2026 15:18:11 -0700 Subject: [PATCH] fix(sql): Implement workaround for Python datetime change More info is here: https://github.com/python/cpython/issues/70647 --- ladybug/sql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ladybug/sql.py b/ladybug/sql.py index dc185812..578eb46c 100644 --- a/ladybug/sql.py +++ b/ladybug/sql.py @@ -980,7 +980,7 @@ def __init__(self, sql_table_row): try: date_str = sql_table_row[8] if '24:00:00' not in sql_table_row[8] else \ sql_table_row[8].replace('24:00:00', '00:00:00') - pyd = datetime.strptime(date_str, '%m/%d %H:%M:%S') + pyd = datetime.strptime('2020-{}'.format(date_str), '%Y-%m/%d %H:%M:%S') self._peak_date_time = DateTime(pyd.month, pyd.day, pyd.hour, pyd.minute) except Exception: # likely a zone with no cooling; a peak value of 0 self._peak_date_time = None