WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WP Does Not Display Correct Date (5 posts)

  1. charlesbytes
    Member
    Posted 4 years ago #

    I am currently running a website using WP2.8.4 at http://www.smkmethodistsibu.org. The php echo date returned the wrong date although I set the UTC option to +8 hours in the admin area. When I tested php echo date('e') on my header.php, it came up as "America/New_york". Problem is I live in Asia. How do I resolve this problem? My readers are all based in Asia and I do not want them to see the wrong date on my site.

    Any help will be much appreciated. Thanks.

  2. Shane G
    Member
    Posted 4 years ago #

    Hi,

    Refer this article:

    http://codex.wordpress.org/Formatting_Date_and_Time

    Thanks,

    Shane G.

  3. charlesbytes
    Member
    Posted 4 years ago #

    Shane,

    It actually worked! Thanks dude !
    And WP, maybe you should take note of this - not all of us live in NY !

  4. charlesbytes
    Member
    Posted 4 years ago #

    If you want to know how I resolved this, I just changed all php echo date() to php echo date_i18n(). All other $strings still work, like php echo date_i18n('e').

  5. premiumdw
    Member
    Posted 4 years ago #

    @charlesbytes: That worked for me too! THANKS!

Topic Closed

This topic has been closed to new replies.

About this Topic