Use Java `Instant` class.

Fix PostgreSQL `UUID` cast syntax.