Skip to content
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

Update to the last change on monolog #17

Closed
Garfield-fr opened this issue Aug 5, 2012 · 5 comments
Closed

Update to the last change on monolog #17

Garfield-fr opened this issue Aug 5, 2012 · 5 comments

Comments

@Garfield-fr
Copy link

Important change is the date and time on log file

Seldaek/monolog#94

Thanks

Bertrand

@stof
Copy link
Member

stof commented Aug 5, 2012

I don't see which changes would be required in the bundle. This PR does not affect the configuration at all. It is changing the internals of the class.

@Garfield-fr
Copy link
Author

The date and time on log file is UTC (only). It's not perfect.
The date.timezone parameter is ignored

@Seldaek
Copy link
Member

Seldaek commented Aug 18, 2012

There is now a 1.2.0 version so you can easily get the timezone fix in your project. I'm closing this because #4 covers the missing features in the bundle regarding the support of the latest monolog.

@Seldaek Seldaek closed this as completed Aug 18, 2012
@Incher25
Copy link

Incher25 commented Dec 16, 2016

How can I fix the timezone properly? In vendor/monolog/monolog/src/Monolog/Logger.php default timezone defined as
if (!static::$timezone) { static::$timezone = new \DateTimeZone(date_default_timezone_get() ?: 'UTC'); }
so I should add date_default_timezone_set('My timezone'), for example, in AppKernel.php, but what if I want just use timezone setting from my php.ini?

@Seldaek
Copy link
Member

Seldaek commented Dec 16, 2016

@Incher25 date_default_timezone_get() returns what is defined in php.ini as date.timezone, so if you set that monolog will use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants