/** * {@inheritdoc} */ public function getOffset(ReadableInstant $instant) { $dateTime = new \DateTime('@' . $instant->getEpochSecond(), new \DateTimeZone('UTC')); return $this->zone->getOffset($dateTime); }
/** * @param integer $epochSecond The expected epoch second. * @param integer $nano The expected nanosecond adjustment. * @param ReadableInstant $instant The instant to test. */ protected function assertReadableInstantIs($epochSecond, $nano, ReadableInstant $instant) { $this->compare([$epochSecond, $nano], [$instant->getEpochSecond(), $instant->getNano()]); }