function _date_ical_calcString in Date 5
Convert a timezone offset in seconds to a formatted timezone offset string i.e. +10800 becomes +0300;
2 calls to _date_ical_calcString()
- date_ical_import in ./
date_ical.inc - Given the location of a valid iCalendar file, will return an array of event information
- _date_ical_chooseOffset in ./
date_ical.inc
File
- ./
date_ical.inc, line 385
Code
function _date_ical_calcString($seconds) {
$sign = substr($seconds, 0, 1);
$seconds = substr($seconds, 1);
$hours = intval($seconds / 3600);
$minutes = intval(($seconds - $hours * 3600) / 60);
return $sign . sprintf("%02d", $hours) . sprintf("%02d", $minutes);
}