Time for July posts not displaying properly (6 posts)

  1. Cujo
    Posted 11 years ago #

    On my main page of my blog as well as sub pages (but not in the admin area) for all my new posts for the month of July the time is being displayed strangely:

    To Catch A Kitty
    Posted in General by Cujo
    July 3rd, 2005 - 5:3 PM

    It is cutting off the minutes for the time. When I go to the admin section and preview the post there the time is formatted correctly:

    To Catch A Kitty
    Filed under: General � @ 5:56 pm

    I've checked the entries in my database and all is fine. It's also only happening on posts in July. My previous posts that occurred in June are all still appearing properly.

    I'm also using wordpress on a separate site and the same thing is happening.

    Anyone have any ideas?

  2. Kafkaesqui

    Posted 11 years ago #

    To help troubleshoot this, can you copy and paste into a reply the line in your index.php template (that is, the one in your 'btc' theme) that displays the date and time? Looks like you're using the_time() with a format string.

    Also, what is the exact time on the (currently) two July posts. Do they both end with the same digit?

  3. Cujo
    Posted 11 years ago #

    Here's the the_time() line:
    <?php the_time('F jS, Y - g:j A') ?>

    And the exact time on the two posts are as follows taken from the database:
    For the post titled To Catch a Kitty:
    post_date: 2005-07-03 17:56:06
    post_date_gmt: 2005-07-03 21:56:06

    For the post titled Look at the City Folk:
    post_date: 2005-07-03 00:21:45
    post_date_gmt: 2005-07-03 04:21:45

    I realized I forgot to add the address to the blog in question in my first post so here it is: http://www.betterthancrabs.com (it's also found in my profile).

  4. pericat
    Posted 11 years ago #

    Instead of 'g:j A', try 'g:i A'.

    The 'j' will just get you the day of the month. I think you want 'i', for minutes after the hour.

  5. Cujo
    Posted 11 years ago #

    WOW. Don't I feel stupid. That worked. Clearly a typo on my part when coding it up.

    Funny thing is I never noticed it before as I put the page up in the double digits of June so I always just assumed the time was just a bit off on the server from my clock time as it was always just off by about 10 minutes.

    Thanks for the keen eyes for spotting that.

  6. pericat
    Posted 11 years ago #

    i and j can be hard to tell apart in small font sizes. :)

Topic Closed

This topic has been closed to new replies.

About this Topic