Page 1 of 1

Date in Comments not correct

Posted: Tue Dec 14, 2004 10:58 pm
by SurfDude
When someone posted a comment, the date below the comment seems not correct. It gives online "month, year, time" and not the day. So now it says "Dec 2004 22:57" instead of "Sunday, December 12. 2004, 22:57". How can this be fixed?

Re: Date in Comments not correct

Posted: Wed Dec 15, 2004 5:23 pm
by garvinhicking
Which language file, which template, which Serendipity version, which PHP version and which Operating System for the webserver are you using?

There are quite a lot possible explanations for this, each of which can be fixed easily. :)

Re: Date in Comments not correct

Posted: Thu Dec 16, 2004 10:54 am
by SurfDude
garvinhicking wrote:Which language file, which template, which Serendipity version, which PHP version and which Operating System for the webserver are you using?

There are quite a lot possible explanations for this, each of which can be fixed easily. :)
I now use the Dutch language file and the standard template, but the problem happends also when I use the English version. I see the same problem on other Serendipity-weblogs too, so I don't think it has something to do with my settings. I have the newest Serendipity version (0.7.1), windows XP and the PHP-version I don't know.

I have been looking for the date-settings for the specific comments.php-page, but I couldn't find it. I guess it can be fixed there...

Posted: Sun Dec 19, 2004 10:01 pm
by SurfDude
Maybe my question is to complicated... :? So let's change the question: where can I set how the date on which a comment is posted, is showed below the comment? I searched in comments.php and functions_comments.inc.php but still didn't found it.

Posted: Mon Dec 20, 2004 4:05 pm
by garvinhicking
You can look in your lang/serendipity_lang_nl.inc.php file and look for DATE_FORMAT_ENTRY and DATE_FORMAT_SHORT constant and see if you can change that.

What you seem to be wanting to change is to look in templates/default/comments.tpl file :-)

Regards,
Garvin

Posted: Mon Dec 20, 2004 9:43 pm
by SurfDude
I start getting crazy here... :shock:

I now use the Dutch language file and my own template. Yo can see it "in action" here: http://surfdude.student.utwente.nl/weblog/ . When you click on "Reacties" below an entry, you can read the comments. For example: http://surfdude.student.utwente.nl/webl ... ]=comments . There you can see the date is now showed as "Dec 2004, 19:58", but I want it to be "19 dec 2004, 19:58 uur".

My serendipity_lang_nl.inc.php file says:
@define('DATE_FORMAT_SHORT', '%Y-%m-%d %H:%M');
@define('DATE_FORMAT_ENTRY', '%A %e %B %Y');

The templates/default/comments.tpl file says:{$comment.timestamp|@formatTime:$CONST.DATE_FORMAT_SHORT}

The strange thing is that when I change DATE_FORMAT_SHORT it has no effect on the way the date is showed below comments... :?: But when I change DATE_FORMAT_ENTRY, I can see the date above an entry changes...

Posted: Mon Dec 20, 2004 10:34 pm
by SurfDude
I finally found it... I'm not sure if it's the "right" way to fix it, but it works. In serendipity_functions.inc.php you can set the way the date is showed below comments.