We can not integrate all just for fun...
The more we integrate the slower will Zend_Date work.
It would be no problem to have interfaces integrated for the best xx
databases. (mssql, mysql, oracle, postgres, dbm2, sqlite,...)
But this would mean to include about 100-200 new lines of code.
Because when we decide to add db-dependence code we should do it for all db
formats and not only for mysql.
If you think it's worth doing feel free to add an jira issue and we will
discuss it in the dev-team.
Greetings
Thomas
I18N Team Leader
----- Original Message -----
From: "Dale McNeill" <[EMAIL PROTECTED]>
Cc: "Zend Framework General" <[email protected]>
Sent: Thursday, September 20, 2007 8:56 PM
Subject: Re: [fw-general] Zend_Date and MySQL datetime
Thomas -
It would certainly make sense to add an interface/constant to aid in
getting a MySQL compatible string. Seems like one of the more, if not the
most, common output usages.
Dale
Thomas Weidner wrote:
Hy,
you are wrong...
The manual does not state that getIso() creates MySql Syntax.
It is written that you can use all ISO formats as input for Zend_Date.
As there are over 50 different ISO formats it would be nonsense to define
as much constants.
But creating an non-standard Zend_Date output is also very easy...
Instead of getIso() just use
toString('YYYY-MM-dd HH:mm:ss');
and you have your self defined output.
Greetings
Thomas
I18N Team Leader
----- Original Message ----- From: "Jack Sleight"
<[EMAIL PROTECTED]>
To: "Zend Framework General" <[email protected]>
Sent: Thursday, September 20, 2007 7:38 PM
Subject: [fw-general] Zend_Date and MySQL datetime
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
--
------------------------------------------------------------------------
Dale McNeill |
Alchemy Systems | phone: (512) 532-8050
http://www.alchemysystems.com | email: [EMAIL PROTECTED]
------------------------------------------------------------------------