コード例 #1
0
 public function test_toOffsetDateTime()
 {
     $this->assertEquals($this->TEST_DATE_TIME->toOffsetDateTime(), OffsetDateTime::ofDateTime($this->TEST_DATE_TIME->toLocalDateTime(), $this->TEST_DATE_TIME->getOffset()));
 }
コード例 #2
0
 /**
  * @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());
 }