-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Timezone for log record datetime attribute. #94
Conversation
Hey, I did an alternative fix (see above), if you can try it and confirm it works as expected it'd be great. Your solution was alright but creating a DateTimeZone instance for every log entry was just not needed. |
Hi.
Yes, you are right. 6cbdc04 works for me. |
Glad to hear, and thanks for pointing out the problem :) |
Thank you ) |
Confirmation: <?php
$timeZone = new DateTimeZone('Europe/Warsaw');
$dateFromTimestamp = DateTime::createFromFormat('U.u', sprintf("%.6f", microtime(true)), $timeZone);
$date = clone $dateFromTimestamp;
$date->setTimeZone($timeZone);
var_dump($date->format('y-m-d H:i:s') === $dateFromTimestamp->format('y-m-d H:i:s')); So I think you should set timezone on |
@mlebkowski that's how I did it in 6cbdc04 - do you have issues with the master branch? |
Oh, sorry, I was on latest stable. My bad. |
Set the |
sorry but could you explain more |
Check your php.ini for a proper date.timezone key |
I checked and I changed it to CET (time zone by my mac, found it in the system preference ) and I changed the id to 47..but still nothing :/ |
Here sou can find the list of supported timezones by php Which is did you change to 47? |
Log record datetime attribute always in UTC+0 timezone but should be in server timezone.
It's an attempt to fix it.