Support » Requests and Feedback » Timestamping prior to 1969?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Possibly. Posts in the database are stored in a MySQL date/time format, but that may rely on a Unix timestamp internally and for that, 0 = mightnight on Jan. 1st, 1970, so…

    Why would you want to fake such old posts anyway though?

    You may want to search the forums for “adodb date” on a possible way of hacking this in WordPress.

    That first link presented there, the one to the job ticket, had a reference in the description to PHP 5.1. As I read it, if my host has that version of PHP installed, I timestamp posts prior to the 1969 limitation. Is that correct? (I’m in the process of looking for another host provider.)

    The documentation on date() states the (“typically,” whatever that means) valid range for it is December 13, 1901 20:45:54 GMT to January 19, 2038 03:14:07 GMT, but that before PHP 5.1 some systems (specifically Windows) were limited to Jaunuary 1, 1970 for the early part of the range. So you’d be better off looking for a host running Unix/Linux or some such, rather than worrying over the PHP ver.

    Although a host providing the latest of both PHP4 and PHP5 can’t be bad for you. :)

    I did read that bit about “specifically windows” but am restricted from timestamping anything prior to Dec. 31, 1969 under a Unix operating system with my current webhost provider. I’m not looking to archive anything prior to 1901, so that wouldn’t be an issue. As I am on the hunt for a new webhost provider anyhow, I thought finding one with PHP 5.1 installed, regardless of the operating system, might take away the 1969 date restriction. Would I be correct in this assumption?

    It’s a good assumption, but then I can’t guarantee anything for what any one host might actually do.

    I’ll note that the host I’m with runs Redhat Linux and PHP 4.4.3 (though they also offer 5.1), and I can set pre-1970 dates on my posts. Not that I’ve ever had a reason to do that…

    Interesting. My host runs Apache Web Server Software, Unix Operating System, and PHP 4.3.11 and I’m unable to timestamp anything prior to Dec. 31, 1969.

    It’s nice to see I have other options to get the date restriction removed (which I do need), other than going with a webhost provider that has PHP v5.1 installed.

    According to their webhost provider is running the following:

    # RedHat
    # Apache 1.3.3x
    # PHP 4.4.x
    # MySQL 4.1.x

    NONE of their demo CMS or blogging apps will allow pre-1970 dates on posts. So, I’m still confused as to which version of PHP will allow this for date(), if any.

    Could WordPress be changed to use mySQL time and date functions?

    The issue is not MySQL. For WordPress to make use of relatively unrestricted dates, it would take the use of something like PHP’s adodb library. You’ll find several threads discussing how one might go about modifying WordPress to it (if you’re up to that). Here’s one such (and hey, look who started it!):

    And to show that a pristine version of WordPress (2.0.2) can be used to post before 1970, here’s a little something on my test blog:

    I went looking for a webhost with PHP5, for this very reason. I am now on a server that has:

    Kernel2.4.21-4.0.1 elsmp

    Because I tried to timestamp a post for a pre-1969 date and it didn’t work (it changed to Dec. 31 1969), I assume that WordPress is using PHP4.3.11 on this dual-PHP server. Is there any way to force it to use PHP55.1.2?

    I answered my own question! For anyone else running under dual-PHP versions and wanting php files to run under PHP5, while having php4 files running under PHP4, use this in your .htaccess file:

    AddHandler x-httpd-php5 .php
    AddHandler x-httpd-php .php4

    Finally, I am able to timestamp posts for pre-1969 dates. In the end, it was all about the PHP version on my webhost server. Anything PHP4.4 and above will allow pre-1969 posts. Anything below it won’t, without the aforementioned modification.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Timestamping prior to 1969?’ is closed to new replies.