Hi,
The ZF manual states that for MySQL datetime values you can use the Zend_Date::ISO_8601 format, and the $date->getIso() method. It is true that if you parse in a date from a MySQL field with the ISO 8601 format constant it will work, but strictly speaking they are not (correctly) ISO 8601 formatted. This becomes a problem when trying to save a date into the database, because the value returned by $date->getIso() is not accepted by MySQL, and it throws an error (Incorrect datetime value: '2007-09-20T18:36:59+01:00'). The correct format for a MySQL datetime string is "YYYY-MM-dd HH:mm:ss".

Could we add this as a new constant in Zend_Date?
--
Jack

Reply via email to