Change am/pm to 24h format?
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
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?
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
DefaultTimeFormatandDefaultDateTimeFormat. But I cannot tell you that for sure.