Hi. After updating to 29.0.5 I constantly get the error DateTimeZone::__construct(): Unknown or bad timezone (Europe/Kiev). In the PHP8.3 configuration the time zone is specified correctly
. But Nextcloud continues to constantly throw such errors.
In which one exactley?
There will likely be multiple php.ini
files on your system, usually at least two, one for the CLI and one for each process manager you have installed, e.g. for prefork or event with PHP-FPM… Make sure the timezone is correct in all php.ini
files. And if you’re using PHP-FPM, don’t forget to restart the service after making changes.
Oh, and in case the above wasn’t the culprit, maybe adding the following line to your config.php will help…
'logtimezone' => 'Europe/Kyiv',
The configuration file was changed first. This also did not solve the problem.
And what about the different php.ini
files? Is it actually correct in all of them? If so, Im not sure where else it would get the wrong value from, unfortunately…
In all PHPini where this parameter was specified, I changed the value. And this also did not solve the problem. And yes, the server was rebooted.
End
cat /etc/timezone
Europe/Kyiv
But
$timedatectl list-timezones
Europe/Jersey
Europe/Kaliningrad
Europe/Kiev
Europe/Kirov
Europe/Kyiv
Europe/Lisbon
In the list of time zones of the server “Ubuntu 24.04” both zones are indicated. Can someone confirm on a similar system for you the same?
Yep, same here. Ubuntu 24.04 does list both zones:
timedatectl list-timezones | grep Europe/K
Europe/Kaliningrad
Europe/Kiev
Europe/Kirov
Europe/Kyiv
However, although I’m not 100% sure, I would say that the fact that both zones are available at the OS level shouldn’t be an issue per se, as the one that is set is the correct one that PHP expects: https://www.php.net/manual/en/timezones.europe.php. So I’m still not sure what’s causing the error in the Nextcloud logs.
Maybe the following GiHub issue will help to point you in the right direction: [Bug]: webdav: Exception: DateTimeZone::__construct(): Unknown or bad timezone (Asia/Calcutta) · Issue #41606 · nextcloud/server · GitHub
Otherwise it could of course also be a bug in Nextcloud, in which case you might want open a new issue on GitHub, or comment on the existing one.
Yep
sudo apt-get install tzdata-legacy
fix
This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.