You are here

function cmfcCalendarV1::setTimeZoneOffset in Calendar Systems 7.3

Same name and namespace in other branches
  1. 8 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::setTimeZoneOffset()
  2. 8.2 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::setTimeZoneOffset()
  3. 5 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::setTimeZoneOffset()
  4. 6.3 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::setTimeZoneOffset()
  5. 6 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::setTimeZoneOffset()
  6. 7 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::setTimeZoneOffset()
  7. 7.2 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::setTimeZoneOffset()
1 call to cmfcCalendarV1::setTimeZoneOffset()
cmfcCalendarV1::setOption in calendar/v1/calendarV1.class.inc.php
* @NOTICE child classed definition should apply the byReference version of function *

File

calendar/v1/calendarV1.class.inc.php, line 62

Class

cmfcCalendarV1

Code

function setTimeZoneOffset($offset) {

  /*
  echo timezone_name_from_abbr($countryShortName);
  echo $countryShortName;
  $timezone = new DateTimeZone($countryShortName);
  $this->_timeZoneInfo=reset($timezone->getTransitions());
  cmfcHtml::printr($this->_timeZoneInfo);
  */
  if (!empty($offset)) {
    list($hour, $minute) = explode(':', $offset);
    $offset = abs($hour) * 60 * 60 + $minute * 60;
    if ($hour < 0) {
      $offset = $offset * -1;
    }
  }
  $this->_timeZoneInfo['offset'] = $offset;
}