Date Field format Error
This is an open discussion with 6 replies, filed under General.
Search
Can you log that as an issue on github please?
The problem is that i can't reproduce the error in another installation.
I have a local install that works all right.
The website is exactly the same as my local site. So, i think the online server has some different configuration that is not being overridden by the date field to work with the config.php information.
Can somebody help with this one, please?
I've finally found (and solved) the problem!
Following the code i found this in the class.datetimeobj.php
:
// PHP 5.3: Apply Symphony date format using 'createFromFormat'
My server is 5.2 by default, so i added the following to my .htaccess
AddHandler application/x-httpd-php53 .php
Since this error happens on php earlier than 5.3, Symphony should require 5.3 instead of 5.2, or change DateTime::createFromFormat
PHP 5.2 support is being phased out in 2.3.1
Create an account or sign in to comment.
My Date setting is
'date_format' => 'd/m/Y',
and the Date field is pre-populated with the following value (wich is correct)24/10/2012 1:26 am
, but when i save the entry, it gives an error:The date specified in ‘Data’ is invalid.
If i change the value in this field to
10/24/2012 1:26 am
it is saved, but then, the value appears as24/10/2012 1:26 am
!! If i hit save again, i see the error again!I'm using symphony 2.3