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()); }
/** * Gets the hours of the Timestamp object * * @return int */ function getHour() { return $this->time->getHour(); }