{"action":"created","issue":{"url":"https://api.github.com/repos/ualibraries/Guide-on-the-Side/issues/103","labels_url":"https://api.github.com/repos/ualibraries/Guide-on-the-Side/issues/103/labels{/name}","comments_url":"https://api.github.com/repos/ualibraries/Guide-on-the-Side/issues/103/comments","events_url":"https://api.github.com/repos/ualibraries/Guide-on-the-Side/issues/103/events","html_url":"https://github.com/ualibraries/Guide-on-the-Side/pull/103","id":55309230,"number":103,"title":"Set a default timezone","user":{"login":"jaronkk","id":127832,"avatar_url":"https://avatars.githubusercontent.com/u/127832?v=3","gravatar_id":"","url":"https://api.github.com/users/jaronkk","html_url":"https://github.com/jaronkk","followers_url":"https://api.github.com/users/jaronkk/followers","following_url":"https://api.github.com/users/jaronkk/following{/other_user}","gists_url":"https://api.github.com/users/jaronkk/gists{/gist_id}","starred_url":"https://api.github.com/users/jaronkk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaronkk/subscriptions","organizations_url":"https://api.github.com/users/jaronkk/orgs","repos_url":"https://api.github.com/users/jaronkk/repos","events_url":"https://api.github.com/users/jaronkk/events{/privacy}","received_events_url":"https://api.github.com/users/jaronkk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-23T17:35:49Z","updated_at":"2015-01-23T22:30:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ualibraries/Guide-on-the-Side/pulls/103","html_url":"https://github.com/ualibraries/Guide-on-the-Side/pull/103","diff_url":"https://github.com/ualibraries/Guide-on-the-Side/pull/103.diff","patch_url":"https://github.com/ualibraries/Guide-on-the-Side/pull/103.patch"},"body":"Fixes #97\r\n\r\nAs described in issue 97, GotS encountered errors serving assets because I didn't have a timezone set in my local PHP setup.  (CakePHP was attempting to send the Last-Modified header for the file).\r\n\r\nThis is fixed by calling date_default_timezone_set('UTC') in app/Config/core.php if date.timezone is not set via the PHP ini.\r\n\r\nI refrained from adding a configuration option since I think most people can get it configured via their PHP settings.  If you would like the configuration option for timezone, I can include this commit: https://github.com/ndlib/Guide-on-the-Side/commit/74a910d45c5f95f6e54d790636e2c8022b478177"},"comment":{"url":"https://api.github.com/repos/ualibraries/Guide-on-the-Side/issues/comments/71277665","html_url":"https://github.com/ualibraries/Guide-on-the-Side/pull/103#issuecomment-71277665","issue_url":"https://api.github.com/repos/ualibraries/Guide-on-the-Side/issues/103","id":71277665,"user":{"login":"simpsonw","id":10437788,"avatar_url":"https://avatars.githubusercontent.com/u/10437788?v=3","gravatar_id":"","url":"https://api.github.com/users/simpsonw","html_url":"https://github.com/simpsonw","followers_url":"https://api.github.com/users/simpsonw/followers","following_url":"https://api.github.com/users/simpsonw/following{/other_user}","gists_url":"https://api.github.com/users/simpsonw/gists{/gist_id}","starred_url":"https://api.github.com/users/simpsonw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simpsonw/subscriptions","organizations_url":"https://api.github.com/users/simpsonw/orgs","repos_url":"https://api.github.com/users/simpsonw/repos","events_url":"https://api.github.com/users/simpsonw/events{/privacy}","received_events_url":"https://api.github.com/users/simpsonw/received_events","type":"User","site_admin":false},"created_at":"2015-01-23T22:30:05Z","updated_at":"2015-01-23T22:30:05Z","body":"Hi @jaronkk ,\r\n\r\nThanks for the pull request!  I definitely think that CakePHP's behavior regarding time zones is a bit wonky, but I'm not 100% sure about this particular fix.  The problem is that ini_get seems to only be checking if something is set in the php.ini file, not if the setting is accounted for in general.  To illustrate,  here's a block of code I tested locally:\r\n```php\r\nif (!ini_get('date.timezone')) {\r\n\t// Set the default timezone to UTC if it was not set via php.ini\r\n\tdate_default_timezone_set('UTC');\r\n}\r\n\r\nif (!ini_get('date.timezone')) {\r\n\tdie(\"here\");\r\n}\r\n```\r\n\r\nWhen I ran it, I got to the die statement, which seems a bit odd to me.  I do like the configuration option you mentioned in https://github.com/ndlib/Guide-on-the-Side/commit/74a910d45c5f95f6e54d790636e2c8022b478177 because it seems to be a bit more explicit.\r\n\r\nJust my two cents, though!"}}