Closed littleibex closed 8 years ago
@mlocati you've got more knowledge in this area and afaik you're running some sites with timezones. Ever ran into this issue?
@remo I actually ran into this recently when a server's timezone changed.
I think this might break the time on any sites that currently use APP_TIMEZONE though, or implemented it later in site development.
Not applicable to the latest legacy version of concrete5. The pull request got corrupted by another commit.
If APP_TIMEZONE is defined by the user in config/site.php, the PHP/Apache timezone for the app is updated in concrete/startup/timezone.php. However, the timezone of the database is still the same as that of the server. This way the same application has different timezone for PHP and a different timezone for the database. This is a source of bug and not a complete solution for providing the feature to set the timezone of the app.
This commit sets the timezone of the database to what is defined in APP_TIMEZONE when the database object is initialised, so that the Apache and MySQL timezone for that particular app remain the same.