Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

changing timestamp format

omyojjomyojj New
edited January 2011 in Vanilla 2.0 - 2.8
Recently migrated to Vanilla 2.0.16 from SMF..
Users don't seem to be accustomed to the way posting date is displayed..
Firstly I had a timezone problem, which I fixed anyhow.
(edited bootstrap.php file)
But one more thing to get configured..
As it is now 2011, only month and year(like 'December, 2010') are displayed for all last year's but recent topics and posts!!
I think forms like '20:30:15, Dec 31, 2010' would be preferred.

I tried searching
http://vanillaforums.org/discussion/10644/date-is-out-by-one-day/
and found that ./conf/config.php has something to do with this..
but got exhausted and frustrated now.(I'm a php noob)

any help appreciated~

Thank you.
Tagged:

Comments

  • You need to edit the \applications\dashboard\locale\en-CA\definition.php file. The time formats are at the very bottom (line 149-152).
    Date.DefaultTimeFormat - During the day (6:45pm)
    Date.DefaultDayFormat - Same year (January 1)
    Date.DefaultYearFormat - Previous/Next years (December 2010)
    You can look up the format at http://www.php.net/manual/function.strftime.php
    The format you desire would be "%H:%M:%S, %b %d, %Y".

    If you wish to replace the way the date is formatted, for example you want it to show x minutes ago or few seconds ago, you would first need to get the code for that and then edit
    \library\core\class.format.php on line 333.
Sign In or Register to comment.