Commit 0022eb3
committed
fix: Strip timezone for PostgreSQL timestamps in DatabaseSessionService
PostgreSQL's default TIMESTAMP type is WITHOUT TIME ZONE, which cannot
accept timezone-aware datetime objects from Python. This causes a
DataError when using asyncpg: "can't subtract offset-naive and
offset-aware datetimes".
The existing code already handled this for SQLite by stripping the
timezone, but PostgreSQL was not handled. This fix applies the same
treatment to PostgreSQL.
Fixes the regression introduced in commit 1063fa5 which changed from
database-generated timestamps (func.now()) to explicit Python datetimes.1 parent 524dc29 commit 0022eb3
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
| 301 | + | |
301 | 302 | | |
302 | 303 | | |
303 | 304 | | |
| |||
0 commit comments