Пример #1
0
 public function testWithMillisecondInTimeZone()
 {
     $year = 2009;
     $month = 2;
     $day = 13;
     $hour = 23;
     $minute = 31;
     $second = 30;
     $millisecond = 250;
     $time = CTime::fromComponentsInTimeZone(new CTimeZone("Europe/Helsinki"), $year, $month, $day, $hour, $minute, $second, $millisecond);
     $time = $time->withMillisecondInTimeZone(new CTimeZone("Europe/Helsinki"), 750);
     $this->assertTrue($time->toStringInTimeZone(new CTimeZone("Europe/Helsinki"), CTime::PATTERN_MYSQL)->equals("2009-02-13 23:31:30") && $time->MTime() === 750);
 }