• Hi WordPress Forum:

    I have an odd situation and I’m not sure if this is something with which you can help.

    When I do a date function in PHP, I get a time result which is 4 hours ahead of our usual EST timezone. It displays GMT. I figured this could be because of a bunch of reasons. One could be that the server’s time is off. However, when I place this on a non-Wordpress page off of my WordPress site (but still on the same server and same folder), it reports the correct time. Another problem could be that the UTC settings in the WordPress dashboard were off. I tried setting them to something different, but it still reported the incorrect time. Regardless of which setting I pick, it displays the same time.

    My date function looks similar to <?php echo date('l j F Y h:i A'); ?>

    Is WordPress doing something to my site which changes the way the date function displays to be four hours ahead? It should report 11:33am now, but it displays 3:33pm the next day. Is there some setting I’m missing? This isn’t happening with my other WordPress sites.

    Any advice you can give would be much appreciated. Thanks!

    Brendan

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Time is incorrect when I use the php date() function.’ is closed to new replies.