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.
Change am/pm to 24h format?
perhane
New
First of alla, a must say I really love this forum script, i have a problem and thats the am/pm clock format. I want to change it to 24h clock, is it possible? And if it is please can someone explain to me how to do it?
0
Comments
You can find the answer here: http://vanillaforums.org/discussion/25741/date-more-specific
Yes I have make a file called locale.php and put this code:
<?php if (!defined('APPLICATION')) exit();
$Definition['Date.DefaultTimeFormat'] = '%H:%M%p'; // If in current day
$Definition['Date.DefaultDayFormat'] = '%B %e'; // If in same year
$Definition['Date.DefaultYearFormat'] = '%B %Y'; // If not in same year
$Definition['Date.DefaultFormat'] = '%B %e, %Y'; // general applications
$Definition['Date.DefaultDateTimeFormat'] = '%c'; // date/time used in attributes
But still the time is AM/PM
Have you deleted the *.ini files in /cache?
Yes I have and now it works! Thank you so much sir!
Btw do i need to use all that code or can I just use this
<?php if (!defined('APPLICATION')) exit();
$Definition['Date.DefaultTimeFormat'] = '%H:%M%p'; // If in current day
Each of this definitions is used at another place. If you only want to change Time display, I'd assume it would be enough to change
DefaultTimeFormat
andDefaultDateTimeFormat
. But I cannot tell you that for sure.