nextcloud/tests/lib/DB
Ferdinand Thiessen 691aedd13e
fix(db): set session timezone to UTC
Some (well all except sqlite) database platforms support timezone
configuration. The problem is that we expect everything in UTC,
but some servers might have set some different default (e.g. in database
configuration or even just because of `TZ` environment variable).

This causes incorrect values when expecting `NOW()` to return the
current time in UTC.

For PHP we already enforce UTC as timezone, this PR adds a middleware
that enforces UTC also as the database connection / session timezone.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-04-01 13:47:03 +02:00
..
Exception chore: run rector 2025-07-01 22:45:52 +02:00
Middleware fix(db): set session timezone to UTC 2026-04-01 13:47:03 +02:00
QueryBuilder fix(ExpressionBuilderTest): Fix test and improve typing 2026-02-06 13:50:47 +01:00
AdapterTest.php refactor(db-adapter): Add tests about fetch methods 2025-11-18 17:45:57 +01:00
ConnectionFactoryTest.php feat(db): add SSL/TLS support for PostgreSQL 2025-09-22 11:51:04 +02:00
ConnectionTest.php refactor: apply rector rules for PHPUnit 10 2025-10-27 21:56:04 +01:00
MigrationServiceTest.php refactor: Apply rector changes 2026-03-01 14:43:11 +00:00
MigratorTest.php refactor: apply rector rules for PHPUnit 10 2025-10-27 21:56:04 +01:00
OCPostgreSqlPlatformTest.php refactor: apply rector rules for PHPUnit 10 2025-10-27 21:56:04 +01:00