public function test_toOffsetDateTime() { $this->assertEquals($this->TEST_DATE_TIME->toOffsetDateTime(), OffsetDateTime::ofDateTime($this->TEST_DATE_TIME->toLocalDateTime(), $this->TEST_DATE_TIME->getOffset())); }
/** * @dataProvider data_instantZones */ public function test_parse_instantZones_LDT(DateTimeFormatter $formatter, $text, ZonedDateTime $expected) { $actual = $formatter->parse($text); $this->assertEquals(LocalDateTime::from($actual), $expected->toLocalDateTime()); }