/** * View for a booking that is about to start. */ public function waitingAction() { $this->view->headTitle($this->_headPrefix . 'Reservation'); $this->view->bid = $this->_request->getParam('bid'); if (!$this->view->bid) { $this->_redirectTo('index', 'queue'); } $booking = Sahara_Soap::getSchedServerBookingsClient()->getBooking(array('userID' => array('userQName' => $this->_auth->getIdentity()), 'bookingID' => array('bookingID' => $this->view->bid))); $this->view->displayName = $booking->displayName; $this->view->time = Sahara_DateTimeUtil::getTsFromISO8601($booking->startTime) - time(); }
/** * Returns true if the specified dateTime is after the current * time. The dateTime format is 'ISO 8601 and * specified in 'http://www.w3.org/TR/xmlschema11-2/#dateTime'. * * @param String $tm1 first time * @param String $tm2 second time * @return boolean true if the first time is before the second time */ public static function isAfterNow($tm) { return Sahara_DateTimeUtil::getTsFromISO8601($tm) > time(); }