Date in Comments not correct

Found a bug? Tell us!!
Post Reply
SurfDude

Date in Comments not correct

Post 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?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Date in Comments not correct

Post 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. :)
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
SurfDude

Re: Date in Comments not correct

Post 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...
SurfDude

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
SurfDude

Post 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...
SurfDude

Post 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.
Post Reply