'Europe/Berlin', 'Europe/Berlin', '2018-09-15T10:00:00+02:00', '2018-09-15T10:00:00+02:00'
],
['Europe/Berlin', 'Europe/Berlin', '2018-09-15T10:00:00+0200', '2018-09-15T10:00:00+0200'
],
['UTC', 'UTC', '2018-10-03T10:00:00.000Z', '2018-10-03T10:00:00.000Z'
],
];
} /**
* @dataProvider transformProvider
*/
public function testTransform($fromTz,
$toTz,
$from,
$to, bool
$withSeconds) { $transformer =
new DateTimeToHtml5LocalDateTimeTransformer($fromTz,
$toTz,
$withSeconds);
$this->
assertSame($to,
$transformer->
transform(null !==
$from ?
new \
DateTime($from) : null
));
} /**
* @dataProvider transformProvider
*/
public function testTransformDateTimeImmutable($fromTz,
$toTz,
$from,
$to, bool
$withSeconds) { $transformer =
new DateTimeToHtml5LocalDateTimeTransformer($fromTz,
$toTz,
$withSeconds);