From cef61dcc97b5cc96b90d49fab5a0b7dc548f8c33 Mon Sep 17 00:00:00 2001 From: XANTRONIX Industrial Date: Sat, 15 Feb 2025 17:10:00 -0500 Subject: [PATCH] Use datetime.__str__(), not isoformat() Use datetime.__str__(), not isoformat() to conform to the native timestamp format of SQLite3 --- lib/nexrad/storm.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/nexrad/storm.py b/lib/nexrad/storm.py index bc3daa0..c8dc613 100644 --- a/lib/nexrad/storm.py +++ b/lib/nexrad/storm.py @@ -199,14 +199,12 @@ class StormReport(DatabaseTable): }) if timestamp is not None: - clauses.append("timestamp_start >= :timestamp and timestamp_end <= :timestamp") + clauses.append(":timestamp between timestamp_start and timestamp_end") values.update({ - 'timestamp': timestamp.isoformat() + 'timestamp': str(timestamp) }) - values.append(timestamp.isoformat()) - sql = "select " + ", ".join(columns) + " from nexrad_storm_report" if len(clauses) > 0: