More fixes for SQLite datetime