code: private function formatO(&$str) {
      if (strstr($str, '%O')) {
        $o   = $this->timezone->offset;
        $os  = $o >= 0 ? '+' : '-';
        $oh  = sprintf('%02d', abs(intval($o)));
        $om  = sprintf('%02d', abs($o - intval($o)) * 60);
        $ofs = "{$os}{$oh}{$om}";
        $str = str_replace('%O', $ofs, $str);
      }
    }
docs: Difference to UTC in hours
  @param type $str