Commit Graph

2 Commits

Author SHA1 Message Date
LearningCircuit
7c2f40cd44 fix: Use SQLAlchemy-UTC for proper timezone handling with SQLite
- Add sqlalchemy-utc package to handle timezone-aware datetimes
- Replace DateTime(timezone=True) with UtcDateTime in benchmark models
- Replace func.now() with utcnow() for proper UTC defaults
- Update pre-commit hook to enforce UtcDateTime usage
- Fixes timezone mismatch errors when SQLite returns naive datetimes

SQLite doesn't natively support timezone-aware datetimes, causing
issues when comparing timestamps. The sqlalchemy-utc package provides
a TypeDecorator that automatically converts between naive and aware
datetimes, ensuring consistent UTC handling across the application.
2025-08-06 20:35:07 +02:00
LearningCircuit
705a04ec79 fix: Add timezone support to DateTime columns and pre-commit hook
- Fixed timezone-aware/naive datetime subtraction error in benchmark
- Added timezone=True to all DateTime columns in benchmark models
- Created pre-commit hook to enforce timezone=True on DateTime columns
- Prevents future timezone-related bugs in database models
2025-08-06 00:16:47 +02:00