24 hour timeformat

Permalink
I do not find anyway to set a 24 hour timeformat in CC5. There is nothing in the help screen, anyone who has a solution?

Thanks,

Kai,
Oslo, Norway

 
PineCreativeLabs replied on at Permalink Reply
PineCreativeLabs
This is something you can do with some general PHP.

First, let's say you want to display a 24-hour time for a page was posted. Do something like this:

<?php  echo $c->getCollectionDatePublic('G'); ?>


You could also use "H" if you want leading zeros.

Or, you could just use basic PHP to make whatever format you want.

Here is a link to PHP time and date formats:
http://php.net/manual/en/function.date.php...

Hope that helps.
CMSDeveloper replied on at Permalink Best Answer Reply
CMSDeveloper
Hi!

Just add a rule to the /config/site.php file:
define('DATE_FORM_HELPER_FORMAT_HOUR', '24'); // can be 12 or 24


Regards
friluftsforeningen replied on at Permalink Reply
Using the config/site.php, seems easy and simple. On place, one global area :-)
ZillionProductions replied on at Permalink Reply
ZillionProductions
Hi, where can this be changed in the current Concrete5 version?

Thanks,
Luca