Forums

Date Changes to Next Day Earlier Than It Should (2 posts)

  1. addicottweb
    Member
    Posted 3 months ago #

    In many of my WordPress themes I use <?php echo date('F j, Y'); ?> to display today's date. I've heard recently that the date changes to the next day earlier than it should, usually 6-7 hours early.

    I've checked with the hosting company to see if it's perhaps the server settings, but the server is located in the same time zone as my clients, so that's not the case.

    Does anyone have any ideas why this could be happening?

  2. vtxyzzy
    Member
    Posted 3 months ago #

    I think you can use date_i18n() to get localized dates. There is probably a way to have WP localize dates automatically, but I do not know what it is.

Reply

You must log in to post.

About this Topic

Tags