Difference between revisions of "Wrong date format in profile plugin"

From Joomla! Documentation

m (mention line number to fix)
Line 15: Line 15:
[[Category:Version 2.5 FAQ]]
[[Category:Version 2.5 FAQ]]
[[Category:Version 2.5.1 FAQ]]
[[Category:Version 2.5.1 FAQ]]
[[Category:Version 2.5.2 FAQ]]
[[Category:Version 2.5.3 FAQ]]

Revision as of 09:08, 15 March 2012

If you see % (ampersand) in your date field, which is part of the profile plugin (date of birth field), you can fix it easily with editing the file plugins/user/profile/profile.php.

Line #227 currently (Joomla! 2.5.1) is:

$data['profile']['dob'] = $date->format('%Y-%m-%d');

and should be changed to:

$data['profile']['dob'] = $date->format('Y-m-d');

See also