{"action":"created","comment":{"url":"https://api.github.com/repos/piwik/piwik/pulls/comments/43044559","id":43044559,"diff_hunk":"@@ -611,6 +612,38 @@ public function subYear($n)\n         return new Date($result, $this->timezone);\n     }\n \n+    protected static $use12HourClock;\n+\n+    protected function getTimeFormat()\n+    {\n+        if (is_null(self::$use12HourClock)) {\n+            self::$use12HourClock = LanguagesManager::uses12HourClockForCurrentUser();","path":"core/Date.php","position":17,"original_position":17,"commit_id":"89341f2eb7ec516336c6110f67a619f3dc5162b6","original_commit_id":"89341f2eb7ec516336c6110f67a619f3dc5162b6","user":{"login":"tsteur","id":273120,"avatar_url":"https://avatars.githubusercontent.com/u/273120?v=3","gravatar_id":"","url":"https://api.github.com/users/tsteur","html_url":"https://github.com/tsteur","followers_url":"https://api.github.com/users/tsteur/followers","following_url":"https://api.github.com/users/tsteur/following{/other_user}","gists_url":"https://api.github.com/users/tsteur/gists{/gist_id}","starred_url":"https://api.github.com/users/tsteur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsteur/subscriptions","organizations_url":"https://api.github.com/users/tsteur/orgs","repos_url":"https://api.github.com/users/tsteur/repos","events_url":"https://api.github.com/users/tsteur/events{/privacy}","received_events_url":"https://api.github.com/users/tsteur/received_events","type":"User","site_admin":false},"body":"Ideally, core would not know about anything implemented by plugins and not access any code from plugins directly. I know it's sometimes not really possible though or it is possible but doesn't make it much better. @diosmosis should we maybe use DI in such a case? Like by default core would always return `true` for `date.uses12HourClockForCurrentUser` DI setting (`global.php`) and LanguagesManager plugin would overwrite it?","created_at":"2015-10-26T20:01:30Z","updated_at":"2015-10-26T20:01:30Z","html_url":"https://github.com/piwik/piwik/pull/9093#discussion_r43044559","pull_request_url":"https://api.github.com/repos/piwik/piwik/pulls/9093","_links":{"self":{"href":"https://api.github.com/repos/piwik/piwik/pulls/comments/43044559"},"html":{"href":"https://github.com/piwik/piwik/pull/9093#discussion_r43044559"},"pull_request":{"href":"https://api.github.com/repos/piwik/piwik/pulls/9093"}}},"pull_request":{"url":"https://api.github.com/repos/piwik/piwik/pulls/9093","id":48686858,"html_url":"https://github.com/piwik/piwik/pull/9093","diff_url":"https://github.com/piwik/piwik/pull/9093.diff","patch_url":"https://github.com/piwik/piwik/pull/9093.patch","issue_url":"https://api.github.com/repos/piwik/piwik/issues/9093","number":9093,"state":"open","locked":false,"title":"Allow user to change time formats (12/24-hour clock)","user":{"login":"sgiehl","id":1579355,"avatar_url":"https://avatars.githubusercontent.com/u/1579355?v=3","gravatar_id":"","url":"https://api.github.com/users/sgiehl","html_url":"https://github.com/sgiehl","followers_url":"https://api.github.com/users/sgiehl/followers","following_url":"https://api.github.com/users/sgiehl/following{/other_user}","gists_url":"https://api.github.com/users/sgiehl/gists{/gist_id}","starred_url":"https://api.github.com/users/sgiehl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgiehl/subscriptions","organizations_url":"https://api.github.com/users/sgiehl/orgs","repos_url":"https://api.github.com/users/sgiehl/repos","events_url":"https://api.github.com/users/sgiehl/events{/privacy}","received_events_url":"https://api.github.com/users/sgiehl/received_events","type":"User","site_admin":false},"body":"Add possibility to change time formats in user settings.\r\n\r\nBesides the language it's now possible to choose the time format:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/1579355/10717614/f8210b02-7b5d-11e5-9257-e6eb184b923c.png)\r\n\r\nThat will make 12- and 24-hour time formats available for all languages.\r\n\r\n24-hour clock format will always be the default for every user.\r\n\r\nfixes #9082","created_at":"2015-10-25T20:22:39Z","updated_at":"2015-10-26T20:01:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf1ca77bc6e3edc9a6821479bfbf7b08bba4baa1","assignee":null,"milestone":{"url":"https://api.github.com/repos/piwik/piwik/milestones/89","html_url":"https://github.com/piwik/piwik/milestones/2.15.1","labels_url":"https://api.github.com/repos/piwik/piwik/milestones/89/labels","id":1257878,"number":89,"title":"2.15.1","description":"","creator":{"login":"mattab","id":466765,"avatar_url":"https://avatars.githubusercontent.com/u/466765?v=3","gravatar_id":"","url":"https://api.github.com/users/mattab","html_url":"https://github.com/mattab","followers_url":"https://api.github.com/users/mattab/followers","following_url":"https://api.github.com/users/mattab/following{/other_user}","gists_url":"https://api.github.com/users/mattab/gists{/gist_id}","starred_url":"https://api.github.com/users/mattab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattab/subscriptions","organizations_url":"https://api.github.com/users/mattab/orgs","repos_url":"https://api.github.com/users/mattab/repos","events_url":"https://api.github.com/users/mattab/events{/privacy}","received_events_url":"https://api.github.com/users/mattab/received_events","type":"User","site_admin":false},"open_issues":30,"closed_issues":1,"state":"open","created_at":"2015-08-17T09:20:14Z","updated_at":"2015-10-26T19:48:51Z","due_on":"2015-11-24T11:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/piwik/piwik/pulls/9093/commits","review_comments_url":"https://api.github.com/repos/piwik/piwik/pulls/9093/comments","review_comment_url":"https://api.github.com/repos/piwik/piwik/pulls/comments{/number}","comments_url":"https://api.github.com/repos/piwik/piwik/issues/9093/comments","statuses_url":"https://api.github.com/repos/piwik/piwik/statuses/89341f2eb7ec516336c6110f67a619f3dc5162b6","head":{"label":"piwik:timeformats","ref":"timeformats","sha":"89341f2eb7ec516336c6110f67a619f3dc5162b6","user":{"login":"piwik","id":698038,"avatar_url":"https://avatars.githubusercontent.com/u/698038?v=3","gravatar_id":"","url":"https://api.github.com/users/piwik","html_url":"https://github.com/piwik","followers_url":"https://api.github.com/users/piwik/followers","following_url":"https://api.github.com/users/piwik/following{/other_user}","gists_url":"https://api.github.com/users/piwik/gists{/gist_id}","starred_url":"https://api.github.com/users/piwik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piwik/subscriptions","organizations_url":"https://api.github.com/users/piwik/orgs","repos_url":"https://api.github.com/users/piwik/repos","events_url":"https://api.github.com/users/piwik/events{/privacy}","received_events_url":"https://api.github.com/users/piwik/received_events","type":"Organization","site_admin":false},"repo":{"id":1548202,"name":"piwik","full_name":"piwik/piwik","owner":{"login":"piwik","id":698038,"avatar_url":"https://avatars.githubusercontent.com/u/698038?v=3","gravatar_id":"","url":"https://api.github.com/users/piwik","html_url":"https://github.com/piwik","followers_url":"https://api.github.com/users/piwik/followers","following_url":"https://api.github.com/users/piwik/following{/other_user}","gists_url":"https://api.github.com/users/piwik/gists{/gist_id}","starred_url":"https://api.github.com/users/piwik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piwik/subscriptions","organizations_url":"https://api.github.com/users/piwik/orgs","repos_url":"https://api.github.com/users/piwik/repos","events_url":"https://api.github.com/users/piwik/events{/privacy}","received_events_url":"https://api.github.com/users/piwik/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/piwik/piwik","description":"Liberating Web Analytics. Star us on Github? +1. Piwik is the leading open alternative to Google Analytics that gives you full control over your data. Piwik lets you easily collect data from websites, apps & the IoT and visualise this data and extract insights. Privacy is built-in. We love Pull Requests! ","fork":false,"url":"https://api.github.com/repos/piwik/piwik","forks_url":"https://api.github.com/repos/piwik/piwik/forks","keys_url":"https://api.github.com/repos/piwik/piwik/keys{/key_id}","collaborators_url":"https://api.github.com/repos/piwik/piwik/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/piwik/piwik/teams","hooks_url":"https://api.github.com/repos/piwik/piwik/hooks","issue_events_url":"https://api.github.com/repos/piwik/piwik/issues/events{/number}","events_url":"https://api.github.com/repos/piwik/piwik/events","assignees_url":"https://api.github.com/repos/piwik/piwik/assignees{/user}","branches_url":"https://api.github.com/repos/piwik/piwik/branches{/branch}","tags_url":"https://api.github.com/repos/piwik/piwik/tags","blobs_url":"https://api.github.com/repos/piwik/piwik/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/piwik/piwik/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/piwik/piwik/git/refs{/sha}","trees_url":"https://api.github.com/repos/piwik/piwik/git/trees{/sha}","statuses_url":"https://api.github.com/repos/piwik/piwik/statuses/{sha}","languages_url":"https://api.github.com/repos/piwik/piwik/languages","stargazers_url":"https://api.github.com/repos/piwik/piwik/stargazers","contributors_url":"https://api.github.com/repos/piwik/piwik/contributors","subscribers_url":"https://api.github.com/repos/piwik/piwik/subscribers","subscription_url":"https://api.github.com/repos/piwik/piwik/subscription","commits_url":"https://api.github.com/repos/piwik/piwik/commits{/sha}","git_commits_url":"https://api.github.com/repos/piwik/piwik/git/commits{/sha}","comments_url":"https://api.github.com/repos/piwik/piwik/comments{/number}","issue_comment_url":"https://api.github.com/repos/piwik/piwik/issues/comments{/number}","contents_url":"https://api.github.com/repos/piwik/piwik/contents/{+path}","compare_url":"https://api.github.com/repos/piwik/piwik/compare/{base}...{head}","merges_url":"https://api.github.com/repos/piwik/piwik/merges","archive_url":"https://api.github.com/repos/piwik/piwik/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/piwik/piwik/downloads","issues_url":"https://api.github.com/repos/piwik/piwik/issues{/number}","pulls_url":"https://api.github.com/repos/piwik/piwik/pulls{/number}","milestones_url":"https://api.github.com/repos/piwik/piwik/milestones{/number}","notifications_url":"https://api.github.com/repos/piwik/piwik/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/piwik/piwik/labels{/name}","releases_url":"https://api.github.com/repos/piwik/piwik/releases{/id}","created_at":"2011-03-30T21:18:17Z","updated_at":"2015-10-26T19:04:46Z","pushed_at":"2015-10-25T21:44:49Z","git_url":"git://github.com/piwik/piwik.git","ssh_url":"git@github.com:piwik/piwik.git","clone_url":"https://github.com/piwik/piwik.git","svn_url":"https://github.com/piwik/piwik","homepage":"http://piwik.org/","size":392174,"stargazers_count":4604,"watchers_count":4604,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":825,"mirror_url":null,"open_issues_count":1147,"forks":825,"open_issues":1147,"watchers":4604,"default_branch":"master"}},"base":{"label":"piwik:master","ref":"master","sha":"a3d394eb969dca2896c4bb31440444cb88c1f69c","user":{"login":"piwik","id":698038,"avatar_url":"https://avatars.githubusercontent.com/u/698038?v=3","gravatar_id":"","url":"https://api.github.com/users/piwik","html_url":"https://github.com/piwik","followers_url":"https://api.github.com/users/piwik/followers","following_url":"https://api.github.com/users/piwik/following{/other_user}","gists_url":"https://api.github.com/users/piwik/gists{/gist_id}","starred_url":"https://api.github.com/users/piwik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piwik/subscriptions","organizations_url":"https://api.github.com/users/piwik/orgs","repos_url":"https://api.github.com/users/piwik/repos","events_url":"https://api.github.com/users/piwik/events{/privacy}","received_events_url":"https://api.github.com/users/piwik/received_events","type":"Organization","site_admin":false},"repo":{"id":1548202,"name":"piwik","full_name":"piwik/piwik","owner":{"login":"piwik","id":698038,"avatar_url":"https://avatars.githubusercontent.com/u/698038?v=3","gravatar_id":"","url":"https://api.github.com/users/piwik","html_url":"https://github.com/piwik","followers_url":"https://api.github.com/users/piwik/followers","following_url":"https://api.github.com/users/piwik/following{/other_user}","gists_url":"https://api.github.com/users/piwik/gists{/gist_id}","starred_url":"https://api.github.com/users/piwik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piwik/subscriptions","organizations_url":"https://api.github.com/users/piwik/orgs","repos_url":"https://api.github.com/users/piwik/repos","events_url":"https://api.github.com/users/piwik/events{/privacy}","received_events_url":"https://api.github.com/users/piwik/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/piwik/piwik","description":"Liberating Web Analytics. Star us on Github? +1. Piwik is the leading open alternative to Google Analytics that gives you full control over your data. Piwik lets you easily collect data from websites, apps & the IoT and visualise this data and extract insights. Privacy is built-in. We love Pull Requests! ","fork":false,"url":"https://api.github.com/repos/piwik/piwik","forks_url":"https://api.github.com/repos/piwik/piwik/forks","keys_url":"https://api.github.com/repos/piwik/piwik/keys{/key_id}","collaborators_url":"https://api.github.com/repos/piwik/piwik/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/piwik/piwik/teams","hooks_url":"https://api.github.com/repos/piwik/piwik/hooks","issue_events_url":"https://api.github.com/repos/piwik/piwik/issues/events{/number}","events_url":"https://api.github.com/repos/piwik/piwik/events","assignees_url":"https://api.github.com/repos/piwik/piwik/assignees{/user}","branches_url":"https://api.github.com/repos/piwik/piwik/branches{/branch}","tags_url":"https://api.github.com/repos/piwik/piwik/tags","blobs_url":"https://api.github.com/repos/piwik/piwik/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/piwik/piwik/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/piwik/piwik/git/refs{/sha}","trees_url":"https://api.github.com/repos/piwik/piwik/git/trees{/sha}","statuses_url":"https://api.github.com/repos/piwik/piwik/statuses/{sha}","languages_url":"https://api.github.com/repos/piwik/piwik/languages","stargazers_url":"https://api.github.com/repos/piwik/piwik/stargazers","contributors_url":"https://api.github.com/repos/piwik/piwik/contributors","subscribers_url":"https://api.github.com/repos/piwik/piwik/subscribers","subscription_url":"https://api.github.com/repos/piwik/piwik/subscription","commits_url":"https://api.github.com/repos/piwik/piwik/commits{/sha}","git_commits_url":"https://api.github.com/repos/piwik/piwik/git/commits{/sha}","comments_url":"https://api.github.com/repos/piwik/piwik/comments{/number}","issue_comment_url":"https://api.github.com/repos/piwik/piwik/issues/comments{/number}","contents_url":"https://api.github.com/repos/piwik/piwik/contents/{+path}","compare_url":"https://api.github.com/repos/piwik/piwik/compare/{base}...{head}","merges_url":"https://api.github.com/repos/piwik/piwik/merges","archive_url":"https://api.github.com/repos/piwik/piwik/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/piwik/piwik/downloads","issues_url":"https://api.github.com/repos/piwik/piwik/issues{/number}","pulls_url":"https://api.github.com/repos/piwik/piwik/pulls{/number}","milestones_url":"https://api.github.com/repos/piwik/piwik/milestones{/number}","notifications_url":"https://api.github.com/repos/piwik/piwik/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/piwik/piwik/labels{/name}","releases_url":"https://api.github.com/repos/piwik/piwik/releases{/id}","created_at":"2011-03-30T21:18:17Z","updated_at":"2015-10-26T19:04:46Z","pushed_at":"2015-10-25T21:44:49Z","git_url":"git://github.com/piwik/piwik.git","ssh_url":"git@github.com:piwik/piwik.git","clone_url":"https://github.com/piwik/piwik.git","svn_url":"https://github.com/piwik/piwik","homepage":"http://piwik.org/","size":392174,"stargazers_count":4604,"watchers_count":4604,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":825,"mirror_url":null,"open_issues_count":1147,"forks":825,"open_issues":1147,"watchers":4604,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/piwik/piwik/pulls/9093"},"html":{"href":"https://github.com/piwik/piwik/pull/9093"},"issue":{"href":"https://api.github.com/repos/piwik/piwik/issues/9093"},"comments":{"href":"https://api.github.com/repos/piwik/piwik/issues/9093/comments"},"review_comments":{"href":"https://api.github.com/repos/piwik/piwik/pulls/9093/comments"},"review_comment":{"href":"https://api.github.com/repos/piwik/piwik/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/piwik/piwik/pulls/9093/commits"},"statuses":{"href":"https://api.github.com/repos/piwik/piwik/statuses/89341f2eb7ec516336c6110f67a619f3dc5162b6"}}}}