-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
fix default value for logdateformat #3178
Conversation
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
@@ -101,7 +101,7 @@ public function format($message) { | |||
$timeZone = $timeZone !== null ? new \DateTimeZone($timeZone) : null; | |||
|
|||
$time = new \DateTime('now', $timeZone); | |||
$timestampInfo = $time->format($this->config->getSystemValue('logdateformat', 'c')); | |||
$timestampInfo = $time->format($this->config->getSystemValue('logdateformat', \DateTime::ISO8601)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\DateTime::ISO8601
isn't actually ISO8601 (https://secure.php.net/manual/de/class.datetime.php#datetime.constants.iso8601), DateTime::ATOM
is the one you're looking for
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow php, Y U not add @deprecated
:(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly not what we currently log: https://secure.php.net/manual/en/function.date.php (the c
also contains the colon) ... and I will for sure not change this format 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@karlitschek I'm open for changing this to proper ISO8601 - we just need to make sure we put it into the release notes.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Current coverage is 53.97% (diff: 66.66%)@@ master #3178 diff @@
==========================================
Files 1299 1298 -1
Lines 80134 80110 -24
Methods 7909 7910 +1
Messages 0 0
Branches 1248 1248
==========================================
+ Hits 43226 43240 +14
+ Misses 36908 36870 -38
Partials 0 0
|
Can we use actual ISO8601 instead of the almost ISO8601 with the notice? |
But then we break all (log management) setups that rely on the fact that our log date contains the |
@icewind1991 can we get this in and decide on the log time format afterwards? Thanks :) |
Actually you now changed the format: https://3v4l.org/MRe6f
So I will adjust this to ATOM |
I'm now totally confused ... -.- the PHP doc says something different. |
Ah okay - got it. |
I compared the new format not to the new format but to itself 🙈 |
cc @j-ed