Add NullableDateTime formatting class

This commit is contained in:
Benoît Burnichon
2016-04-05 18:52:17 +02:00
parent aeac1a7141
commit d0dcdf6e6f
9 changed files with 49 additions and 36 deletions

View File

@@ -10,6 +10,7 @@
*/
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Utilities\NullableDateTime;
class Bridge_Element
{
@@ -383,9 +384,9 @@ class Bridge_Element
SET uploaded_on = :uploaded_on, updated_on = :update WHERE id = :id';
$params = [
':uploaded_on' => $this->uploaded_on ? $this->uploaded_on->format(DATE_ISO8601) : null
, ':id' => $this->id
, ':update' => $this->updated_on->format(DATE_ISO8601)
':uploaded_on' => NullableDateTime::format($this->uploaded_on, DATE_ISO8601),
':id' => $this->id,
':update' => $this->updated_on->format(DATE_ISO8601),
];
$stmt = $this->app->getApplicationBox()->get_connection()->prepare($sql);