{"action":"created","issue":{"url":"https://api.github.com/repos/concrete5/concrete5-legacy/issues/1918","labels_url":"https://api.github.com/repos/concrete5/concrete5-legacy/issues/1918/labels{/name}","comments_url":"https://api.github.com/repos/concrete5/concrete5-legacy/issues/1918/comments","events_url":"https://api.github.com/repos/concrete5/concrete5-legacy/issues/1918/events","html_url":"https://github.com/concrete5/concrete5-legacy/pull/1918","id":101815778,"number":1918,"title":"Update MySQL timezone if APP_TIMEZONE is defined","user":{"login":"littleibex","id":13836991,"avatar_url":"https://avatars.githubusercontent.com/u/13836991?v=3","gravatar_id":"","url":"https://api.github.com/users/littleibex","html_url":"https://github.com/littleibex","followers_url":"https://api.github.com/users/littleibex/followers","following_url":"https://api.github.com/users/littleibex/following{/other_user}","gists_url":"https://api.github.com/users/littleibex/gists{/gist_id}","starred_url":"https://api.github.com/users/littleibex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/littleibex/subscriptions","organizations_url":"https://api.github.com/users/littleibex/orgs","repos_url":"https://api.github.com/users/littleibex/repos","events_url":"https://api.github.com/users/littleibex/events{/privacy}","received_events_url":"https://api.github.com/users/littleibex/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-19T06:16:35Z","updated_at":"2015-08-19T06:24:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/concrete5/concrete5-legacy/pulls/1918","html_url":"https://github.com/concrete5/concrete5-legacy/pull/1918","diff_url":"https://github.com/concrete5/concrete5-legacy/pull/1918.diff","patch_url":"https://github.com/concrete5/concrete5-legacy/pull/1918.patch"},"body":"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. \r\n\r\nThis 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."},"comment":{"url":"https://api.github.com/repos/concrete5/concrete5-legacy/issues/comments/132460792","html_url":"https://github.com/concrete5/concrete5-legacy/pull/1918#issuecomment-132460792","issue_url":"https://api.github.com/repos/concrete5/concrete5-legacy/issues/1918","id":132460792,"user":{"login":"Mnkras","id":212649,"avatar_url":"https://avatars.githubusercontent.com/u/212649?v=3","gravatar_id":"","url":"https://api.github.com/users/Mnkras","html_url":"https://github.com/Mnkras","followers_url":"https://api.github.com/users/Mnkras/followers","following_url":"https://api.github.com/users/Mnkras/following{/other_user}","gists_url":"https://api.github.com/users/Mnkras/gists{/gist_id}","starred_url":"https://api.github.com/users/Mnkras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mnkras/subscriptions","organizations_url":"https://api.github.com/users/Mnkras/orgs","repos_url":"https://api.github.com/users/Mnkras/repos","events_url":"https://api.github.com/users/Mnkras/events{/privacy}","received_events_url":"https://api.github.com/users/Mnkras/received_events","type":"User","site_admin":false},"created_at":"2015-08-19T06:24:28Z","updated_at":"2015-08-19T06:24:28Z","body":"@remo I actually ran into this recently when a server's timezone changed.\r\n\r\nI think this might break the time on any sites that currently use APP_TIMEZONE though, or implemented it later in site development."}}