• Resolved cnyiradi

    (@cnyiradi)


    I hope this is the right place to post about this topic.

    I’m using php shortcode and I’m simple trying to display today’s date… however it’s displaying tomorrows date instead.

    I have updated settings / general / timezone to my timezone so that has already been covered.

    This is the code I’m using

    [echo]date(“F d, Y”);[/echo]

    it’s very simple and in theory it works great aside from displaying tomorrows date and not today’s. are there any files I need to modify for this theme? I read somewhere that the default template settings could be in GMT I’m on Pacific Standard Time / PST.

    I’ve spent a few hours trying to figure this out with no real answer to show for it.

    Any help would be great!

    TIA,
    ChrisN

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello!

    I would advice that check your server’s clock, maybe that is set wrong… You can check what date WordPress shows in Dashboard->Setttings->General
    However, the php code you are using is not connected in any way to WordPress time/date settings. If you have a shared hosting, the best way is to ask the hosting company for the server’s current time and date.

    Let me know what you have found out.

    Cheers,
    Toth Balint BT

    Thread Starter cnyiradi

    (@cnyiradi)

    Hi Toth The code is connected via “php shortcode” plug in and is correct according to php.net/date it display’s the date fine however, in the late afternoon early evening the date get’s changed to the next day.

    In my wp cp dates and times are correct which is why I find this puzzling.

    I may just have to contact my host (GoDaddy) to see if it’s on their end but thanks for responding.

    Cheers,
    ChrisN

    You are welcome!

    Thread Starter cnyiradi

    (@cnyiradi)

    Looks like it’s working great now maybe it just needed some time to get synced up or something it’s resolved thanks again 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Todays Date’ is closed to new replies.