You are here

function cmfcCalendarV1::setTimeZoneOffset in Calendar Systems 5

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. 6.3 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::setTimeZoneOffset()
  4. 6 calendar/v1/calendarV1.class.inc.php \cmfcCalendarV1::setTimeZoneOffset()
  5. 7.3 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

File

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

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;
}