nextcloud/lib/private/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
..
Exceptions refactor: Apply comments 2026-02-06 13:50:46 +01:00
Middleware fix(db): set session timezone to UTC 2026-04-01 13:47:03 +02:00
QueryBuilder feat(DB): Add ITypedQueryBuilder 2026-02-23 14:06:11 +01:00
Adapter.php refactor: Apply comments 2026-02-06 13:50:46 +01:00
AdapterMySQL.php chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +02:00
AdapterOCI8.php fix: Revert "fix(db): Store last insert id before reconnect" 2025-05-21 07:55:42 +02:00
AdapterPgSql.php fix: Revert "fix(db): Store last insert id before reconnect" 2025-05-21 07:55:42 +02:00
AdapterSqlite.php chore(deps): Update nextcloud/coding-standard to v1.3.1 2024-09-19 14:21:20 +02:00
ArrayResult.php feat(DB): Add ITypedQueryBuilder 2026-02-23 14:06:11 +01:00
BacktraceDebugStack.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
Connection.php feat(DB): Add ITypedQueryBuilder 2026-02-23 14:06:11 +01:00
ConnectionAdapter.php feat(DB): Add ITypedQueryBuilder 2026-02-23 14:06:11 +01:00
ConnectionFactory.php fix(db): set session timezone to UTC 2026-04-01 13:47:03 +02:00
DbDataCollector.php refactor: Apply comments 2026-02-06 13:50:46 +01:00
MigrationException.php refactor: Apply comments 2026-02-06 13:50:46 +01:00
MigrationService.php refactor: Run rector on lib/private 2026-02-06 13:50:18 +01:00
Migrator.php refactor: Apply comments 2026-02-06 13:50:46 +01:00
MigratorExecuteSqlEvent.php refactor: Run rector on lib/private 2026-02-06 13:50:18 +01:00
MissingColumnInformation.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
MissingIndexInformation.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
MissingPrimaryKeyInformation.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
MySqlTools.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
ObjectParameter.php refactor: Apply comments 2026-02-06 13:50:46 +01:00
OCSqlitePlatform.php feat(rector): Enable SafeDeclareStrictTypesRector 2026-02-09 10:59:31 +01:00
OracleConnection.php fix: correctly quote tablenames for truncating with oracle 2026-02-10 22:48:02 +01:00
OracleMigrator.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
PgSqlTools.php refactor: Apply comments 2026-02-06 13:50:46 +01:00
PreparedStatement.php style: update codestyle for coding-standard 1.2.3 2024-08-25 19:34:58 +02:00
ResultAdapter.php feat(DB): Add ITypedQueryBuilder 2026-02-23 14:06:11 +01:00
SchemaWrapper.php refactor: Apply comments 2026-02-06 13:50:46 +01:00
SetTransactionIsolationLevel.php chore: Add SPDX header 2024-05-24 13:11:22 +02:00
SQLiteMigrator.php feat(rector): Enable SafeDeclareStrictTypesRector 2026-02-09 10:59:31 +01:00
SQLiteSessionInit.php refactor: Apply comments 2026-02-06 13:50:46 +01:00