WordPress.org

Ready to get started?Download WordPress

Forums

Date Time Bug?? in WP 2.0 (6 posts)

  1. pcdinh
    Member
    Posted 8 years ago #

    I posted an entry at January 01, 2006 @ 00:01 but when I published it, the timestamp displayed: # January 1st, 2006
    # 12:01 am. It is not correct, isn't it?

    Do you think that it is a bug?

    pcdinh

  2. Kafkaesqui

    Posted 8 years ago #

    What is the theme you're using?

    Check your theme's templates to make sure they do not use the_time() template tag with a date format string which is generating your time in am/pm format.

  3. kapikua
    Member
    Posted 8 years ago #

    i dont undestand.. i have too this tag in classic theme.

    <?php the_time() ?>

    And have same problem that pcdinh

    Regards and Happy new year

    Kapikua

  4. Austin Matzko
    Member
    Posted 8 years ago #

    I think this may just be a misunderstanding of AM and PM. "January 01, 2006 @ 00:01" is "January 1st, 2006, 12:01 am."

    It seems weird, but it goes like this:
    11 PM
    12 AM
    1 AM
    etc.

  5. pcdinh
    Member
    Posted 8 years ago #

    I have been using rdc0.7. The code in template is as follows:

    <li class="icon date"><?php the_time('F jS, Y') ?>
    <li class="icon time"><?php the_time('g:i a'); ?>

  6. ifelse
    Member
    Posted 8 years ago #

    "January 01, 2006 @ 00:01 but when I published it, the timestamp displayed: January 1st, 2006 12:01 am. It is not correct, isn't it?"

    Actually it is correct. 00:01 is the same as 12:01am. AM means "ante meridiem" or before noon (and likewise, PM means post meridiam and afternoon).

    If you want times in a 24 hour format, use
    the_time('G:i a')
    instead of
    the_time('g:i a')

    See: http://uk2.php.net/date and http://codex.wordpress.org/Formatting_Date_and_Time

Topic Closed

This topic has been closed to new replies.

About this Topic