nextcloud/tests/lib
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
..
Accounts refactor: apply rector rules for PHPUnit 10 2025-10-27 21:56:04 +01:00
Activity refactor: Cleanup some unit tests 2025-10-01 10:11:27 +02:00
App fix(openmetrics): Allow openmetrics in info.xml 2026-01-24 13:11:18 +01:00
AppFramework refactor: Apply rector changes 2026-03-22 14:45:16 +00:00
Archive refactor(Files): Remove deprecated streamCopy method 2026-02-17 06:43:16 +01:00
Authentication refactor: Add more typing 2026-02-06 13:55:39 +01:00
Avatar chore: setting test metadata in annotations is deprecated (use attributes) 2025-11-05 15:42:40 +01:00
BackgroundJob fix(bg_jobs): store job argument as a text, increase length cap from 4000 to 32000 2026-03-18 15:50:38 +01:00
Cache refactor(tests): returnValue is deprecated 2025-11-05 15:42:34 +01:00
Calendar feat: automated appointment creation 2026-01-15 13:31:44 -05:00
Collaboration refactor: Apply rector changes 2026-03-01 14:43:11 +00:00
Command fix(jobs): Limit command jobs to known cases 2025-11-04 11:10:40 +01:00
Comments fix(comments): Correctly treat end of message as end of code block/inline 2026-03-17 15:34:47 +01:00
Config chore: Remove broken PresetManager tests 2026-01-27 16:31:22 +01:00
Contacts/ContactsMenu fix: Unify handling of exclude groups in contacts menu and sharing 2025-12-09 19:16:59 +01:00
DB fix(db): set session timezone to UTC 2026-04-01 13:47:03 +02:00
Diagnostics refactor: Add more typing 2026-02-06 13:55:39 +01:00
DirectEditing refactor: apply rector rules for PHPUnit 10 2025-10-27 21:56:04 +01:00
Encryption refactor(Files): Modernize Wrapper 2026-02-17 06:43:16 +01:00
Federation refactor: apply rector rules for PHPUnit 10 2025-10-27 21:56:04 +01:00
Files test(ViewTest): disable Nextcloud not PHP - drop testTouchFloat() 2026-03-10 22:12:42 -04:00
FilesMetadata refactor: apply rector rules for PHPUnit 10 2025-10-27 21:56:04 +01:00
GlobalScale chore: run rector 2025-07-01 22:45:52 +02:00
Group fix(group): pass previous display name in GroupChangedEvent 2026-03-17 09:16:30 +00:00
Hooks refactor: use logical && || instead of weak and or operators 2025-09-27 23:02:18 +02:00
Http fix(DnsPinning): Ensure to always lookup based on FQDN 2026-03-22 20:34:55 +01:00
Install/Events feat(install): add InstallationCompletedEvent for post-installation hooks 2026-01-28 09:24:24 +01:00
IntegrityCheck chore(rector): Run rector on apps, core and tests directory 2026-02-06 13:23:23 +01:00
L10N fix(L10N): stop stripping _ from language codes 2026-02-25 15:28:34 +01:00
Lock chore(rector): Run rector on apps, core and tests directory 2026-02-06 13:23:23 +01:00
Lockdown refactor: apply rector rules for PHPUnit 10 2025-10-27 21:56:04 +01:00
Log chore: run rector 2025-07-01 22:45:52 +02:00
Mail feat(ocp): add email address validator 2025-08-14 18:34:36 +02:00
Memcache feat(rector): Enable SafeDeclareStrictTypesRector 2026-02-09 10:59:31 +01:00
Migration fix(DB): support up to 63 character long table and index names 2026-01-18 14:50:34 +01:00
Net test(net): include test for localhost by IP 2025-10-14 10:33:35 +02:00
Notification chore: run rector 2025-07-01 22:45:52 +02:00
OCM refactor: Apply rector changes 2026-03-01 14:43:11 +00:00
OCS chore: run rector 2025-07-01 22:45:52 +02:00
OpenMetrics fix(openmetrics): ensure unit is a suffix of metric name 2026-01-27 10:12:25 +01:00
Preview chore: Fix SPDX header 2026-03-16 08:38:16 +01:00
Profile/Actions chore: run rector 2025-07-01 22:45:52 +02:00
Remote chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
Repair refactor: Add more typing 2026-02-06 13:55:39 +01:00
RichObjectStrings chore: run rector 2025-07-01 22:45:52 +02:00
Route refactor: apply rector rules for PHPUnit 10 2025-10-27 21:56:04 +01:00
Search test(SearchComposerTest): add unit test for getProviders with mixed order values 2025-08-11 09:42:56 +02:00
Security chore(rector): Run rector on apps, core and tests directory 2026-02-06 13:23:23 +01:00
Session chore(rector): Run rector on apps, core and tests directory 2026-02-06 13:23:23 +01:00
Settings chore: run rector 2025-07-01 22:45:52 +02:00
SetupCheck chore: run rector 2025-07-01 22:45:52 +02:00
Share20 perf: Perform share path validation early 2026-02-26 11:38:59 +01:00
Snowflake chore(snowflakes): don't remove file lock directory during tests 2026-02-03 17:01:28 +01:00
Support refactor: Add more typing 2026-02-06 13:55:39 +01:00
SystemTag chore(tests): Fix bogus parameter passed by tests to createTag 2026-03-30 11:38:15 +02:00
Talk chore: Add SPDX header 2024-05-13 17:41:36 +02:00
TaskProcessing Merge pull request #56063 from nextcloud/tests/taskprocessing 2025-10-31 15:04:49 +01:00
Template refactor(tests): getMockForAbstractClass is deprecated 2025-11-05 15:42:34 +01:00
TextProcessing refactor: apply rector rules for PHPUnit 10 2025-10-27 21:56:04 +01:00
Traits chore(rector): Run rector on apps, core and tests directory 2026-02-06 13:23:23 +01:00
Updater test(Updater): Harden flaky test 2026-02-04 09:44:56 +01:00
User feat(rector): Enable SafeDeclareStrictTypesRector 2026-02-09 10:59:31 +01:00
Util refactor: Add more typing 2026-02-06 13:55:39 +01:00
AllConfigTest.php refactor: Deprecated user config from IConfig correctly 2025-12-11 13:27:47 +01:00
AppConfigIntegrationTest.php chore: Run rector with new rules for fetch 2025-11-18 17:45:57 +01:00
AppConfigTest.php chore: Remove broken PresetManager tests 2026-01-27 16:31:22 +01:00
AppScriptSortTest.php refactor: apply rector rules for PHPUnit 10 2025-10-27 21:56:04 +01:00
AppTest.php refactor: apply rector rules for PHPUnit 10 2025-10-27 21:56:04 +01:00
BinaryFinderTest.php test(BinaryFinder): Make sure the test is portable between systems 2025-09-05 09:47:47 +02:00
CapabilitiesManagerTest.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
ConfigTest.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
ContactsManagerTest.php refactor: Add more typing 2026-02-06 13:55:39 +01:00
DateTimeFormatterTest.php refactor: Add more typing 2026-02-06 13:55:39 +01:00
EmojiHelperTest.php chore: run rector 2025-07-01 22:45:52 +02:00
ErrorHandlerTest.php chore: run rector 2025-07-01 22:45:52 +02:00
EventSourceFactoryTest.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
FilesTest.php refactor(Files): Remove deprecated streamCopy method 2026-02-17 06:43:16 +01:00
HelperStorageTest.php fix(reflection): ReflectionMethod::setAccessible is noop since 8.1 2025-12-19 15:57:04 +01:00
HookHelper.php feat(rector): Enable SafeDeclareStrictTypesRector 2026-02-09 10:59:31 +01:00
ImageTest.php refactor: apply rector rules for PHPUnit 10 2025-10-27 21:56:04 +01:00
InfoXmlTest.php fix(openmetrics): Make openmetrics always an array like all other infoxml fields 2026-01-24 14:17:35 +01:00
InitialStateServiceTest.php chore: run rector 2025-07-01 22:45:52 +02:00
InstallerTest.php refactor: apply rector rules for PHPUnit 10 2025-10-27 21:56:04 +01:00
LargeFileHelperGetFileSizeTest.php chore(rector): Run rector on apps, core and tests directory 2026-02-06 13:23:23 +01:00
LargeFileHelperTest.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
LoggerTest.php fix: Use configured loglevel even when log.condition matches is set 2026-02-26 23:12:20 +01:00
MemoryInfoTest.php chore: setting test metadata in annotations is deprecated (use attributes) 2025-11-05 15:42:40 +01:00
NaturalSortTest.php chore: run rector 2025-07-01 22:45:52 +02:00
NavigationManagerTest.php chore: run rector 2025-07-01 22:45:52 +02:00
RepairTest.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
ServerTest.php refactor: remove long deprecated IServerContainer methods 2026-03-10 10:36:35 +01:00
SetupTest.php feat(install): dispatch InstallationCompletedEvent in Setup 2026-01-28 09:24:24 +01:00
SubAdminTest.php chore: Run rector with new rules for fetch 2025-11-18 17:45:57 +01:00
TagsTest.php fix: Fix user in Tags class, do not depend upon session 2026-03-13 15:13:40 +01:00
TemplateFunctionsTest.php fix(template): add import map for JS module entry points 2026-01-12 13:34:11 +01:00
TemplateLayoutTest.php chore: Adapt tests to TemplateLayout constructor changes 2026-03-08 17:57:44 +01:00
TempManagerTest.php chore(rector): Run rector on apps, core and tests directory 2026-02-06 13:23:23 +01:00
TestCase.php refactor: Apply rector changes 2026-03-01 14:43:11 +00:00
TestMoveableMountPoint.php chore: apply new CSFixer rules 2025-07-01 16:26:50 +02:00
UpdaterTest.php fix: Cleanup OC_App uses in Updater class 2025-08-18 16:13:14 +02:00
UrlGeneratorTest.php fix(tests): Use testing application for testing ajax endpoints, not user_ldap 2025-11-21 14:23:58 +01:00
UtilCheckServerTest.php refactor: apply rector rules for PHPUnit 10 2025-10-27 21:56:04 +01:00
UtilTest.php refactor: apply rector rules for PHPUnit 10 2025-10-27 21:56:04 +01:00