WordPress.org

Ready to get started?Download WordPress

Forums

Post date stuck on Jan 1, 2009 (2 posts)

  1. spencerjw
    Member
    Posted 5 years ago #

    Already almost a month into the new year I just now realized that my blog posts are all coming through as "Wednesday ~ January 01, 2009". I did a search of the forums and it seems no one else is experiencing this.

    I really don't even know what to do to figure this out, I am at a total loss as to why my date function would be stuck all of a sudden.

    The only thing I can think of is that my Twitter plugin (Twitter Tools) could be causing the issue since I added that and hadn't posted in the new year before it was installed. However, deactivating it does not seem to fix the problem, even new dates after deactivation come through as "Wednesday ~ January 01, 2009".

    The code to pull the date is as follows:
    <?php the_time('l ~ F m, Y') ?>

    Blog: http://spencerjw.com/blog/

    Anyone experience anything like this, know of a solution or have other suggestions to get this fixed?

  2. tugbucket
    Member
    Posted 5 years ago #

    http://us3.php.net/manual/en/function.date.php

    for reference.

    Your issue is that you have "m" when you should have "d".

    where it's printing out "Wednesday ~ January 01, 2009" the "01" is the numeric representation of the month. "d" is the actual day.

    <?php the_time('l ~ F d, Y') ?>

    that's what you want to use.

Topic Closed

This topic has been closed to new replies.

About this Topic