WordPress.org

Ready to get started?Download WordPress

Forums

the_time and Unix date (3 posts)

  1. deflorence
    Member
    Posted 4 years ago #

    We have archives dating back to 1926, and it is important that we are able to show the posts original date, rather than the date at which they were published. We have of course modified all the posts publishing dates to reflect this.

    However, posts with a published date prior to 1970 show their dates as today's date. I believe this has to do with UNIX date system.

    This behavior occurs with any theme as well as the default theme for WP 2.9x so it would indicate that the_time() function somehow cannot cope with pre 1970 dates.

    Any hack or work around, allowing us to a)show the original published date of pre 1970 posts and b)do a chronological time sort on those original dates?

    With thanks

  2. deflorence
    Member
    Posted 4 years ago #

    Resolved-I think.

    From WP 2.8 a check on the integer representing the date has been introduced. If that value is negative, then the returned date is set to the current date.

    After removing the check, the posts are displayed in the correct date order. See on:

  3. deflorence
    Member
    Posted 4 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic