2014-03-24 15:37:25 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @phpversion 5.5
|
|
|
|
*/
|
|
|
|
|
2014-03-24 19:16:07 +01:00
|
|
|
use Tester\Assert;
|
2014-03-24 15:37:25 +01:00
|
|
|
|
|
|
|
require __DIR__ . '/bootstrap.php';
|
|
|
|
|
2015-01-10 19:11:30 +01:00
|
|
|
$conn = new DibiConnection($config);
|
|
|
|
$translator = new DibiTranslator($conn);
|
2014-03-24 15:37:25 +01:00
|
|
|
|
|
|
|
$datetime = new DateTime('1978-01-23 00:00:00');
|
|
|
|
|
|
|
|
Assert::equal($datetime->format('U'), $translator->formatValue(new DateTime($datetime->format('c')), NULL));
|
|
|
|
Assert::equal($datetime->format('U'), $translator->formatValue(new DateTimeImmutable($datetime->format('c')), NULL));
|