projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
56b3636
)
Create quoted datetime strings of DateTime objects.
author
Jan Schneider
<jan@horde.org>
Wed, 13 May 2009 23:24:21 +0000
(
01:24
+0200)
committer
Jan Schneider
<jan@horde.org>
Wed, 13 May 2009 23:24:39 +0000
(
01:24
+0200)
framework/Db/lib/Horde/Db/Adapter/Abstract/Schema.php
patch
|
blob
|
history
diff --git
a/framework/Db/lib/Horde/Db/Adapter/Abstract/Schema.php
b/framework/Db/lib/Horde/Db/Adapter/Abstract/Schema.php
index
65352db
..
b50ac25
100644
(file)
--- a/
framework/Db/lib/Horde/Db/Adapter/Abstract/Schema.php
+++ b/
framework/Db/lib/Horde/Db/Adapter/Abstract/Schema.php
@@
-118,6
+118,10
@@
abstract class Horde_Db_Adapter_Abstract_Schema
"#{quoted_string_prefix}'#{quote_string(value.to_yaml)}'"
end
*/
+ } elseif ($value instanceof DateTime) {
+ return $this->_adapter->quoteString($type == 'integer'
+ ? $value->format('U')
+ : $value->format('Y-m-d H:i:s'));
} else {
/*@TODO
when String, ActiveSupport::Multibyte::Chars