Exemplo n.º 1
0
 public function test_now_ZoneId()
 {
     $zone = ZoneId::of("UTC+01:02:03");
     $expected = LocalTime::nowOf(Clock::system($zone));
     $test = LocalTime::nowIn($zone);
     for ($i = 0; $i < 100; $i++) {
         if ($expected->equals($test)) {
             return;
         }
         $expected = LocalTime::nowOf(Clock::system($zone));
         $test = LocalTime::nowIn($zone);
     }
     $this->assertEquals($test, $expected);
 }