{"action":"created","issue":{"url":"https://api.github.com/repos/textpattern/textpacks/issues/206","repository_url":"https://api.github.com/repos/textpattern/textpacks","labels_url":"https://api.github.com/repos/textpattern/textpacks/issues/206/labels{/name}","comments_url":"https://api.github.com/repos/textpattern/textpacks/issues/206/comments","events_url":"https://api.github.com/repos/textpattern/textpacks/issues/206/events","html_url":"https://github.com/textpattern/textpacks/issues/206","id":190426860,"number":206,"title":"GMT offset string reused","user":{"login":"petecooper","id":226578,"avatar_url":"https://avatars.githubusercontent.com/u/226578?v=3","gravatar_id":"","url":"https://api.github.com/users/petecooper","html_url":"https://github.com/petecooper","followers_url":"https://api.github.com/users/petecooper/followers","following_url":"https://api.github.com/users/petecooper/following{/other_user}","gists_url":"https://api.github.com/users/petecooper/gists{/gist_id}","starred_url":"https://api.github.com/users/petecooper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petecooper/subscriptions","organizations_url":"https://api.github.com/users/petecooper/orgs","repos_url":"https://api.github.com/users/petecooper/repos","events_url":"https://api.github.com/users/petecooper/events{/privacy}","received_events_url":"https://api.github.com/users/petecooper/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"petecooper","id":226578,"avatar_url":"https://avatars.githubusercontent.com/u/226578?v=3","gravatar_id":"","url":"https://api.github.com/users/petecooper","html_url":"https://github.com/petecooper","followers_url":"https://api.github.com/users/petecooper/followers","following_url":"https://api.github.com/users/petecooper/following{/other_user}","gists_url":"https://api.github.com/users/petecooper/gists{/gist_id}","starred_url":"https://api.github.com/users/petecooper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petecooper/subscriptions","organizations_url":"https://api.github.com/users/petecooper/orgs","repos_url":"https://api.github.com/users/petecooper/repos","events_url":"https://api.github.com/users/petecooper/events{/privacy}","received_events_url":"https://api.github.com/users/petecooper/received_events","type":"User","site_admin":false},"assignees":[{"login":"petecooper","id":226578,"avatar_url":"https://avatars.githubusercontent.com/u/226578?v=3","gravatar_id":"","url":"https://api.github.com/users/petecooper","html_url":"https://github.com/petecooper","followers_url":"https://api.github.com/users/petecooper/followers","following_url":"https://api.github.com/users/petecooper/following{/other_user}","gists_url":"https://api.github.com/users/petecooper/gists{/gist_id}","starred_url":"https://api.github.com/users/petecooper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petecooper/subscriptions","organizations_url":"https://api.github.com/users/petecooper/orgs","repos_url":"https://api.github.com/users/petecooper/repos","events_url":"https://api.github.com/users/petecooper/events{/privacy}","received_events_url":"https://api.github.com/users/petecooper/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2016-11-18T21:32:53Z","updated_at":"2016-11-28T20:22:49Z","closed_at":null,"body":"I added some explanatory text to `gmtoffset` in commit https://github.com/textpattern/textpacks/commit/dd81fe9c02f4412daf290d39ee7781de2e864c48 and it works fine in Diagnostics where no geographical region is defined but the time offset is (Digital Ocean Ubuntu, I'm looking at you).\r\n\r\nI've just spotted that the timezone in Admin -> Preferences uses `gmtoffset` as the gTxt, but doesn't actually state the offset in seconds, just the timezone from a loooong dropdown.\r\n\r\nWhat's the best way to resolve this?:\r\n\r\n* add another gTxt for the Admin -> Preferences area (this is my current preferred choice)\r\n* actually show the GMT offset (yuck)\r\n* revert the commit above (this will leave a bracketed number in Diagnostics where timezone doesn't have a name assigned)\r\n* something else\r\n\r\nSorry I didn't spot this earlier."},"comment":{"url":"https://api.github.com/repos/textpattern/textpacks/issues/comments/263383247","html_url":"https://github.com/textpattern/textpacks/issues/206#issuecomment-263383247","issue_url":"https://api.github.com/repos/textpattern/textpacks/issues/206","id":263383247,"user":{"login":"petecooper","id":226578,"avatar_url":"https://avatars.githubusercontent.com/u/226578?v=3","gravatar_id":"","url":"https://api.github.com/users/petecooper","html_url":"https://github.com/petecooper","followers_url":"https://api.github.com/users/petecooper/followers","following_url":"https://api.github.com/users/petecooper/following{/other_user}","gists_url":"https://api.github.com/users/petecooper/gists{/gist_id}","starred_url":"https://api.github.com/users/petecooper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petecooper/subscriptions","organizations_url":"https://api.github.com/users/petecooper/orgs","repos_url":"https://api.github.com/users/petecooper/repos","events_url":"https://api.github.com/users/petecooper/events{/privacy}","received_events_url":"https://api.github.com/users/petecooper/received_events","type":"User","site_admin":false},"created_at":"2016-11-28T20:22:49Z","updated_at":"2016-11-28T20:22:49Z","body":"There's a function in `txp_prefs.php` that refers to `gmtoffset` in the `pluggable_ui` context:\r\n\r\n```\r\n/**\r\n * Renders a HTML &lt;select&gt; list of cities for timezone selection.\r\n *\r\n * Can be altered by plugins via the 'prefs_ui > gmtoffset'\r\n * pluggable UI callback event.\r\n *\r\n * @param  string $name HTML name of the list\r\n * @param  string $val  Initial (or current) selected option\r\n * @return string HTML\r\n */\r\n\r\nfunction gmtoffset_select($name, $val)\r\n{\r\n    // Fetch *hidden* pref\r\n    $key = get_pref('timezone_key', '', true);\r\n\r\n    if ($key === '') {\r\n        $key = (string) Txp::get('\\Textpattern\\Date\\Timezone')->getTimezone();\r\n    }\r\n\r\n    $tz = new timezone;\r\n    $ui = $tz->selectInput('timezone_key', $key, false, '', 'gmtoffset');\r\n\r\n    return pluggable_ui('prefs_ui', 'gmtoffset', $ui, $name, $val);\r\n}\r\n```\r\n\r\nIn the spirit of not breaking plugins & things, I'd like to clarify -- is this the instance of `gmtoffset` that needs changing to `tz_timezone` to _only_ affect the HTML output, or is it elsewhere?:\r\n\r\n```\r\n    $ui = $tz->selectInput('timezone_key', $key, false, '', 'gmtoffset');\r\n```\r\n\r\nI think this is a @Bloke or @bloatware question. I'd appreciate clarification at a convenient time -- thanks."}}
{"actor":{"display_login":"petecooper"}}