• Resolved mps1

    (@mps1)


    I run lunch specials at my restaurant available Mon – Fri from 11AM to 3PM.

    I am using the following shortcode on the page where I want to show and hide the content.

    [time-restrict-repeat type=”weekly” onday=”Monday” offday=”Friday” ontime=”11:00:00″ offtime=”15:00:00″]
    My menu here
    [/time-restrict-repeat]

    I can see the content passed the 3PM mark. Am I doing anything wrong?

    I’m running wp4.8.1, and I have the timezone in WordPress set to New York as it is my closest city.

    Any suggestions are appreciated.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Dave Clements

    (@thewanderingbrit)

    Hi!

    First, a clarification: It’s not about whether New York is your closest city, but whether New York is in the same time zone as you. If that’s true, then I’m thinking it’s likely a caching issue. Do you use a caching plugin?

    Thread Starter mps1

    (@mps1)

    Hello, yes same timezone. I am located about 35 miles south of NYC.

    No caching plugin in the site, but the VPS does have Varnish installed and running. Do I need to add anything in the rules for it?

    Thanks!

    Plugin Author Dave Clements

    (@thewanderingbrit)

    Does this content or widget appear on every page? If so, it would be hard to add a rule for it, because you’d end up excluding every page from the cache, and then, what’s the point, right?

    An alternative might be if you can force the cache to flush at 3pm? Or accept that the cache may mean some readers see the message after 3pm, and modify your message to account for that (Today's lunch special, Asparagus soup is available until 3pm).

    The shortcode and the plugin are working correctly it seems. Caching is great, except when you want instant changes on the site…

    • This reply was modified 7 years, 6 months ago by Dave Clements.
    Thread Starter mps1

    (@mps1)

    It appears in only one page. I’ll check to see if I can force a flush at 3PM if not then I’ll exclude it to see how it goes.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Issue with times’ is closed to new replies.