New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
owncloud server 9 > logtimezone #23134
Comments
I can confirm that I'm seeing the same thing here. The LogTimeZone setting in the config.php does not appear to affect the actual timestamps in the logs, which breaks fail2ban. |
I am seeing the same behavior. Log time stamps do not reflect the timezone set. |
I can confirm the problem also.
|
I decided this issue . One possible solution is: file owncloud \ lib \ private \ log \ owncloud.php replace strings
on
|
Thx @StrannikST for the temp solution |
You’re welcome |
I can confirm this issue, too. It is caused by commits d0464bf, 7fce06b. TroubleshootingThe problem seems to be caused by the function 'DateTime::createFromFormat', which has the following constraint:
Source: https://secure.php.net/manual/en/datetime.createfromformat.php Fix proposalRemove the timezone parameter from "DateTime::createFromFormat" because it has no effect and just set timezone afterwards. $time = DateTime::createFromFormat("U.u", number_format(microtime(true), 4, ".", ""));
$time ? $time->setTimezone($timezone) : $time = new DateTime(null, $timezone); That's it! |
CC @schnidrig |
This is the PR in question #18978 |
@Phiber2000 looks good, mind turning it into a PR? |
PS: but dont use inline if for something like that. |
@nickvergessen I'll create the PR in some minutes, using if-else blocks in code. |
#23225 was merged |
Thank you for posting the fix for this. It has been driving me insane. |
Is this backported? |
Yes it is: #23240 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hello. Help please , updated to 9 owncloud server. Now it does not work logtimezone (config.php). And now fail2ban not bans . Since time does not match. What to do?
Steps to reproduce
Expected behaviour
When recording a log does not change the time zone
Actual behaviour
When recording logs must change the time zone
Server configuration
Operating system:
ubuntu server 14.01
Web server:
apache2
Database:
mysql
PHP version:
php 7
ownCloud version: (see ownCloud admin page)
owncloud server 9
The text was updated successfully, but these errors were encountered: