Change to European Date Format

Permalink 1 user found helpful
Hi all,

I've read several posts on how to hack code in order to change from the US date format to the European date format, however, they all refer to different .php files and different ways of changing the format.

Can anyone tell me where to make this change for Concrete I read somewhere that this function would be incorporated in this version, but nothing is found in the Dashboard.

Any recent info would be appreciated.


View Replies: View Best Answer
defunct replied on at Permalink Best Answer Reply
I found some new defines in app.php.

You should be able to overwrite them in your site.php.

These 4 should be probably the most used:

# New date constants
if (!defined('DATE_APP_GENERIC_MDYT_FULL')) {
        define('DATE_APP_GENERIC_MDYT_FULL', t('F d, Y \a\t g:i A'));
if (!defined('DATE_APP_GENERIC_MDYT')) {
        define('DATE_APP_GENERIC_MDYT', t('n/j/Y \a\t g:i A'));
if (!defined('DATE_APP_GENERIC_MDY')) {
        define('DATE_APP_GENERIC_MDY', 'n/j/Y');
if (!defined('DATE_APP_GENERIC_MDY_FULL')) {
        define('DATE_APP_GENERIC_MDY_FULL', t('F d, Y'));
if (!defined('DATE_APP_GENERIC_T')) {
        define('DATE_APP_GENERIC_T', 'g:i A');

So you should be able to provide the European format of D/M/YYYY in site.php with:

define('DATE_APP_GENERIC_MDY', 'j/n/Y');

For more information on date formatting see PHP's date function
melat0nin replied on at Permalink Reply
I got this to work (thanks), although the main dashboard page still shows US dates for last login and last edit. I'm trying to find the relevant code to change, will post back if I'm successful.
wizard247 replied on at Permalink Reply
Hi melat0nin,

How did you get this to work? I made the changes to my site.php, but all my Simple Event calendar dates still show as US dates? Any ideas on that one?

This is what I have in my site.php:

define('DATE_APP_GENERIC_MDY', 'j/n/Y');

If I try to include any of the other 4 defines above, my site.php does not load and therefore the page doesn't load. It seems that the "t" in the above defines are causing the site.php to crash.

Mnkras replied on at Permalink Reply
I assume this is Chad Strat's package, unfortunately his addon does not support this, i suggest you go to the addon's page and hit support and open a topic there

wizard247 replied on at Permalink Reply
Can you confirm that my settings in site.php are correct for European Date Format?

define('DATE_APP_GENERIC_MDYT_FULL', 'j F, Y \a\t g:i A');
define('DATE_APP_GENERIC_MDYT', 'j/n/Y \a\t g:i A');
define('DATE_APP_GENERIC_MDY', 'j/n/Y');

Wizard 247
RadiantWeb replied on at Permalink Reply
SimpleEvents has now been updated to support the core app.php date formatting.

jim2mullered replied on at Permalink Reply
Has anyone managed to find out how to change the date format on the main page of the dashboard under 'Site Activity'? I have tried to find out how to change this without any success so far.
kinesisdigital replied on at Permalink Reply
Surely this is something which should be intergrated in the backend already?

After 3-4 years, we're still needing to manually change the code?
losttheplot replied on at Permalink Reply
Getting all the date inputs and displays into a British format has not been easy for me, and there is probably still something, somewhere in the system, waiting to bite me. Anyway, this is my latest list of necessary site.php overrides (the exact details are down to you but don't forget the date picker):

define('DATE_APP_GENERIC_MDYT','j/n/Y \a\t g:ia');
define('DATE_APP_GENERIC_MDYT_FULL','dS F Y \a\t g:ia');
define('DATE_APP_DATE_PICKER', 'dd-mm-yy');

...and note that you need to be running the very latest version of c5 ( or the release just prior to this) which includes a bug fix relevant to this issue.