{"action":"closed","issue":{"url":"https://api.github.com/repos/websharks/s2member-kb/issues/240","labels_url":"https://api.github.com/repos/websharks/s2member-kb/issues/240/labels{/name}","comments_url":"https://api.github.com/repos/websharks/s2member-kb/issues/240/comments","events_url":"https://api.github.com/repos/websharks/s2member-kb/issues/240/events","html_url":"https://github.com/websharks/s2member-kb/issues/240","id":96182016,"number":240,"title":"Why does rounding with the [s2Eot /] round_to shortcode attribute not work as expected?","user":{"login":"raamdev","id":53005,"avatar_url":"https://avatars.githubusercontent.com/u/53005?v=3","gravatar_id":"","url":"https://api.github.com/users/raamdev","html_url":"https://github.com/raamdev","followers_url":"https://api.github.com/users/raamdev/followers","following_url":"https://api.github.com/users/raamdev/following{/other_user}","gists_url":"https://api.github.com/users/raamdev/gists{/gist_id}","starred_url":"https://api.github.com/users/raamdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raamdev/subscriptions","organizations_url":"https://api.github.com/users/raamdev/orgs","repos_url":"https://api.github.com/users/raamdev/repos","events_url":"https://api.github.com/users/raamdev/events{/privacy}","received_events_url":"https://api.github.com/users/raamdev/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/websharks/s2member-kb/labels/draft","name":"draft","color":"fef2c0"},{"url":"https://api.github.com/repos/websharks/s2member-kb/labels/questions","name":"questions","color":"0052cc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-20T22:53:02Z","updated_at":"2015-08-05T19:30:47Z","closed_at":"2015-08-05T19:30:47Z","body":"---\r\n##### KB Article Creation Checklist\r\n\r\n- [x] Write initial draft for this KB Article; label this issue `draft` and either `questions` or `tutorials`\r\n- [x] Add [required YAML configuration](https://github.com/websharks/team/wiki/KB-Articles-::-Required-YAML-Configuration)\r\n- [ ] Add Tags for this KB Article to the YAML config (see [YAML Keys (Explained)](https://github.com/websharks/team/wiki/KB-Articles-::-Required-YAML-Configuration#yaml-keys-explained))\r\n- [ ] Edit and finalize draft for publishing (remove `draft` label, add `draft-finalized` label)\r\n- [ ] Assign Issue to yourself and [create Markdown file](https://github.com/websharks/team/wiki/KB-Articles-::-Creating-the-Markdown-File) (remove `draft-finalized` label, add `pending`)\r\n- [ ] Project Lead: Review and Publish KB Article (remove `pending` label, add `published` label)\r\n\r\n##### Additional TODOs\r\n\r\n_Additional TODO list items go here._\r\n\r\n```yaml\r\ntitle: Why does rounding with the [s2Eot /] round_to shortcode attribute not work as expected?\r\ncategories: questions\r\ntags: \r\nauthor: raamdev\r\ngithub-issue: \r\n```\r\n---\r\nThe `[s2Eot /]` shortcode bases all calculations on the UTC timezone. If you're using the `timezone=\"\"` attribute inside your `[s2Eot /]` shortcode to display EOTs with a specific timezone, keep in mind that rounding calculations will be based on UTC and not the timezone you're using with the `[s2Eot /]` shortcode.\r\n\r\nFor example, let's say you have an EOT time of `Jul 20th, 2016, 9:48 pm UTC` and on your site you're using the `[s2Eot /]` shortcode as follows:\r\n\r\n```wpsc\r\n[s2Eot timezone=\"EDT\" /]\r\n```\r\n\r\nThat will display the EOT time as `Jul 20th, 2016, 5:48 pm EDT` (4 hours behind UTC).\r\n\r\nNow let's say that we add `round_to=\"tomorrow\"` to tell the `[s2Eot /]` shortcode to round up the EOT time to next day. \r\n\r\n```wpsc\r\n[s2Eot timezone=\"EDT\" round_to=\"tomorrow\" /]\r\n```\r\n\r\nWe'd expect this to mean that the EOT time would now be shown as `Jul 21st`, however since we're showing the EOT time in the `EDT` timezone, it shows the rounded EOT time _4 hours behind UTC_. That means the rounded EOT actually shows as `Jul 20th, 2016, 8:00 pm EDT`."}}