Forum Replies Created

Viewing 1 replies (of 1 total)
  • I have been working on the same problem ***ALL DAY*** and now I find the solution after I just finished writing the same exact code.

    One thing though, to fix the code from being off a few hours, you have to take into account your server time being different from your local time.

    Make sure you go to the WordPress Options panel and set your correct time zone.

    Then change the following code:

    if($offsetEnd > time()) {

    to:

    if($offsetEnd > current_time(‘timestamp’, false)) {

    Hope this fixes your problem, for the post being 1 hour off.

    This was a really frustrating learning experience! 🙂

Viewing 1 replies (of 1 total)