Fix time

Breaks compatibility with SQLite due to surprising datetime behavior.

Tests now run against postgres.