WordPress.org

Ready to get started?Download WordPress

Forums

New comments haver date 01-01-1970, 01:00 (5 posts)

  1. salnet
    Member
    Posted 7 years ago #

    OK, it's like the topic said: New comments by users (registered users and anonymus users) have the date 01-01-1970, 01:00
    I'm using 2.1 in a new installation
    Is there a way to make this failure go away? The search-function hasn't found any topic regarding this error.

  2. JeremyVisser
    Member
    Posted 7 years ago #

    Very strange. Do new posts also have this date?

    Does all calls to the PHP date() function have the same behaviour? Try running a simple PHP script on your server comprising the following code:

    <?php
        echo date();
    ?>
  3. salnet
    Member
    Posted 7 years ago #

    The result is:
    Warning: Wrong parameter count for date() in /home/www/s/salnet/html/date.php on line 2

  4. salnet
    Member
    Posted 7 years ago #

    After I added parameters to your example, it worked, but it showed the correct date and time.
    You can see it at http://www.salnet.de/date.php

    <?php
        echo date("l dS of F Y h:i:s A");
    ?>
  5. JeremyVisser
    Member
    Posted 7 years ago #

    I'm getting a 404 now, but never mind. I believe you.

    OK, now if you can find a quiet spot to do it in your theme's footer or something, add the following:

    <!--<?php echo the_time('F j, Y'); ?>-->

    Then see if you get a 1970 date.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags