1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-04 13:17:58 +02:00

Firebird: fix datetime precision (#277) (#273)

This commit is contained in:
jahudka
2018-02-16 10:47:00 +01:00
committed by David Grudl
parent 1bae6eae08
commit dbca915bfe

View File

@@ -313,7 +313,7 @@ class FirebirdDriver implements Dibi\Driver, Dibi\ResultDriver, Dibi\Reflector
if (!$value instanceof \DateTime && !$value instanceof \DateTimeInterface) {
$value = new Dibi\DateTime($value);
}
return $value->format("'Y-m-d H:i:s.u'");
return "'" . substr($value->format('Y-m-d H:i:s.u'), 0, -2) . "'";
}