예제 #1
0
파일: TimeTest.php 프로젝트: seytar/psx
 public function testTimeMicroSecondsAndOffset()
 {
     $time = new Time('19:35:20.1234+01:00');
     $this->assertEquals(19, $time->getHour());
     $this->assertEquals(35, $time->getMinute());
     $this->assertEquals(20, $time->getSecond());
     $this->assertEquals(123400, $time->getMicroSecond());
     $this->assertEquals(3600, $time->getOffset());
     $this->assertInstanceOf('DateTimeZone', $time->getTimeZone());
     $this->assertEquals('19:35:20.123400+01:00', $time->toString());
 }
예제 #2
0
 /**
  * Gets the hours of the Timestamp object
  *
  * @return int
  */
 function getHour()
 {
     return $this->time->getHour();
 }