Support » Alpha/Beta/RC » Dates before 1970 Still broken in 2.0RC3?

  • Any chance of having WordPress 2.0 support historical information (meaning dates) before 1970? Why cram the date and time into a 32 bit number just because PHP time() does?

    I’ve tried the adobdb date functions, but a blog entry from 1812 still displays as 1948 (with WordPress 1.52 plus adodb date functions)

    Separate variables for Year, day of year, and time of day will handle any date.

    I was hoping to use WordPress and not have to license MT for this historical series of letters.


Viewing 15 replies - 1 through 15 (of 16 total)
  • Don’t use Windows. 😛

    Moderator Matt Mullenweg



    This may be fixed in 2.1 if you file a bug for it.

    > Don’t use Windows. 😛

    I normally don’t. My webhost is Linux, My desktop is linux. Would you have been happier if I said 1960?

    This may be fixed in 2.1 if you file a bug for it.

    Log in with your WP support info and click New Ticket. Select “enhancement” for severity. (I’d like to see this make it in.)

    Ticket #2149 Created

    Sorrow. I see that the original poster has, indeed, gone to MT due to the lack of historical date support. I, too, am interested in achieving dates before Jan 1, 1970 for historical purposes. While I’m game for installing the adobdb date functions, I’d much rather not have to alter core functionality (and then maintain it, through successive upgrades).

    Unfortunately, I see that ticket #2149 has had its priority set to low 🙁

    2.x seems to want 4 different files changed, one of which requires a new line of code (for permalinks). This is unfortunate. If you want more details I can provide. Still testing it though.


    MaryE, I’m in need for some more details.

    Which are the 4 files that must be changed, according to your tests? I wouldn’t want to make more changes than necessary.
    And how about the line of code for permalinks, can you tell me more?



    Sorry for the hiatus, here’s what I’ve found, based upon WP 2.03 (been playing w/ some other sw):

    WP 2.x needs requires a bit more modification to support adodb date/time functions than previous versions of WP. In particular, I had to change the following files to get the funcitons to operation properly:

    * functions.php
    * functions-formatting.php
    * template-functions-general.php
    * template-functions-link.php

    The templating functions seem to be a new twist. I developed it under Windows (easyPHP) and have deployed it to Linux. I only include into functions.php. The permalinks require a 1 line change to replace strtodate() with code used in other functions elsewhere in WP.

    I doubt this is a problem in the release version, which is now 2.0.5 – you really should upgrade immediately.


    I’ll give 2.05 a try tonight perhaps – these are just sites I dabble with – do not feel an “immediate” urge to update. Are you saying that I will not have to replace any date time functions? I still see “mktime()” being used in a number of functions … anyway a quick install will show if I can post dates on an entry prior to 1900.


    Generally, once you install or upgrade, and make/save a post, the date corrects itself. But are you really wanting dates actually prior to 1900? That’s a bit odd…. hmmm. Let’s see – where did I see a blog that did that? I’ll have to dig around – I lost all my history and bookmarks in a boot drive crash….

    I appreciate all MaryE’s work on the adodb hack. It works like a charm and I’m using it. I’m especially thankful for MaryE verifying the specific function files affected.

    My way was to do a global search and replace on the whole wp-includes folder, changing getdate(), date(), gmdate(), and so on, converting every date/time call to adodb_xxxxx(). It seems solid, but all hacks make me nervous. Someone in the future may have to work with my legacy code, and I’ll hate being cussed at posthumously.

    I just found this topic and i’m a little bit curious.

    I thought Unix can’t display dates before 1970 (unix timestamp 0). So I thought there will never be (not in the next 10 years) an official function to calculate older dates?

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Dates before 1970 Still broken in 2.0RC3?’ is closed to new replies.