You are here

function _ical_calc_offset in Event 5.2

1 call to _ical_calc_offset()
_ical_calc_time in ./ical.inc

File

./ical.inc, line 342
API for event import/export in iCalendar format as outlined in Internet Calendaring and Scheduling Core Object Specification http://www.ietf.org/rfc/rfc2445.txt

Code

function _ical_calc_offset($offset_str) {
  $sign = substr($offset_str, 0, 1);
  $hours = substr($offset_str, 1, 2);
  $mins = substr($offset_str, 3, 2);
  $secs = (int) $hours * 3600 + (int) $mins * 60;
  if ($sign == '-') {
    $secs = 0 - $secs;
  }
  return $secs;
}