Custom module date_entered bad format

Hi,

With a custom module, date_entered and date_modified in DetailView is ever set to today ( for each record) and in a 07/10/2015 format that we don’t use. (10/07/2015 is correct for us). Our user settings are all in the right format, and into database all dates are correct ( not set to today but real dates ). After a quick repair, it looks like it works but the data remain in wrong format 07/10/2015. It looks to happen now and then and each time I’ve to do a quick repair.

Any ideas?

Sometimes values are cached.

You need to add a customCode line to the detailviewdefs.php file.

You can create this file from the default file in custom/modules/yourmodule/metadata.

You need to add the customCode line to the date field in question.

For Date Created:



'customCode' => '{$fields.date_entered.value}',

For Date Modified:



'customCode' => '{$fields.date_modified.value}',

Thanks,

Will.