{"id":21722,"date":"2012-07-08T17:53:13","date_gmt":"2012-07-09T00:53:13","guid":{"rendered":"http:\/\/tri.be\/support\/forums\/topic\/todays-events-code-shows-todays-and-tomorrows-events\/"},"modified":"2015-07-07T06:25:54","modified_gmt":"2015-07-07T13:25:54","slug":"todays-events-code-shows-todays-and-tomorrows-events","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/todays-events-code-shows-todays-and-tomorrows-events\/","title":{"rendered":"Today&#8217;s events code shows today&#8217;s and tomorrow&#8217;s events"},"content":{"rendered":"<p>Great plugin, but I&#8217;m having this issue.<\/p>\n<p>Using this code to show today&#8217;s events only on the home page:<\/p>\n<p>global $post;<br \/> $CurrentDate = date(&#8216;Y-m-d&#8217;);<br \/> $events_today = tribe_get_events(<br \/> array(<br \/> &#8216;start_date&#8217;=&gt;$CurrentDate,<br \/> &#8216;end_date&#8217;=&gt;$CurrentDate,<br \/> &#8216;eventCat&#8217; =&gt; 102,<br \/> )<br \/> );<br \/> foreach($events_today as $post) {<br \/> setup_postdata($post);<\/p>\n<p>The problem is that at 8pm, it shows the next day&#8217;s events as well as the current date&#8217;s events. At first I thought it might be a timezone issue as the shared server is PDT while I am EDT, 3 hours ahead. The fact that it shows both days, though, seems to be a different problem.<\/p>\n<p>I tried editing the .htaccess and changing the WordPress site to PDT to no avail.<\/p>\n<p>Note that all events in question end before midnight on the start_date.<\/p>\n<p>Help on this issue would be greatly appreciated as we&#8217;re misinforming people when the events show up under &#8220;Happening today at&#8230;&#8221;<\/p>\n<p>Thanks!<\/p>\n<p>ECP\/TEC 2.07<br \/> WP 3.4.1<\/p>\n","protected":false},"template":"","class_list":["post-21722","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Today&#039;s events code shows today&#039;s and tomorrow&#039;s events -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/todays-events-code-shows-todays-and-tomorrows-events\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Today&#039;s events code shows today&#039;s and tomorrow&#039;s events -\" \/>\n<meta property=\"og:description\" content=\"Great plugin, but I&#8217;m having this issue. Using this code to show today&#8217;s events only on the home page: global $post; $CurrentDate = date(&#8216;Y-m-d&#8217;); $events_today = tribe_get_events( array( &#8216;start_date&#8217;=&gt;$CurrentDate, &#8216;end_date&#8217;=&gt;$CurrentDate, &#8216;eventCat&#8217; =&gt; 102, ) ); foreach($events_today as $post) { setup_postdata($post); The problem is that at 8pm, it shows the next day&#8217;s events as well as [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/todays-events-code-shows-todays-and-tomorrows-events\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-07-07T13:25:54+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/todays-events-code-shows-todays-and-tomorrows-events\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/todays-events-code-shows-todays-and-tomorrows-events\/\",\"name\":\"Today's events code shows today's and tomorrow's events -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2012-07-09T00:53:13+00:00\",\"dateModified\":\"2015-07-07T13:25:54+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/todays-events-code-shows-todays-and-tomorrows-events\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/todays-events-code-shows-todays-and-tomorrows-events\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/todays-events-code-shows-todays-and-tomorrows-events\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Today&#8217;s events code shows today&#8217;s and tomorrow&#8217;s events\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Today's events code shows today's and tomorrow's events -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/todays-events-code-shows-todays-and-tomorrows-events\/","og_locale":"en_US","og_type":"article","og_title":"Today's events code shows today's and tomorrow's events -","og_description":"Great plugin, but I&#8217;m having this issue. Using this code to show today&#8217;s events only on the home page: global $post; $CurrentDate = date(&#8216;Y-m-d&#8217;); $events_today = tribe_get_events( array( &#8216;start_date&#8217;=&gt;$CurrentDate, &#8216;end_date&#8217;=&gt;$CurrentDate, &#8216;eventCat&#8217; =&gt; 102, ) ); foreach($events_today as $post) { setup_postdata($post); The problem is that at 8pm, it shows the next day&#8217;s events as well as [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/todays-events-code-shows-todays-and-tomorrows-events\/","article_modified_time":"2015-07-07T13:25:54+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/todays-events-code-shows-todays-and-tomorrows-events\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/todays-events-code-shows-todays-and-tomorrows-events\/","name":"Today's events code shows today's and tomorrow's events -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2012-07-09T00:53:13+00:00","dateModified":"2015-07-07T13:25:54+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/todays-events-code-shows-todays-and-tomorrows-events\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/todays-events-code-shows-todays-and-tomorrows-events\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/todays-events-code-shows-todays-and-tomorrows-events\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Today&#8217;s events code shows today&#8217;s and tomorrow&#8217;s events"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/21722","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/21722\/revisions"}],"predecessor-version":[{"id":977494,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/21722\/revisions\/977494"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=21722"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}