Пример #1
0
 public function testCreateFromFormatInTimezone()
 {
     $native = \DateTime::createFromFormat('Y-m-d H:i', '2016-24-31 12:42', new \DateTimeZone('America/Porto_Acre'));
     $haste = DateTime::createFromFormat('Y-m-d H:i', '2016-24-31 12:42', new \DateTimeZone('America/Porto_Acre'));
     static::assertEquals($native->format('c'), $haste->format('c'));
     static::assertInstanceOf('Haste\\DateTime\\DateTime', $haste);
 }