function _date_ical_calcTime in Date 5
Convert time from one timezone to another.
Parameters
$have - a timezone string for the submitted timestamp:
$want - the desired output timezone string:
$time - a timestamp to be converted:
Return value
converted value
1 call to _date_ical_calcTime()
- date_ical_import in ./
date_ical.inc - Given the location of a valid iCalendar file, will return an array of event information
File
- ./
date_ical.inc, line 372
Code
function _date_ical_calcTime($have, $want, $time) {
if ($have == 'none' || $want == 'none') {
return $time;
}
$have_secs = _date_ical_calcOffset($have);
$want_secs = _date_ical_calcOffset($want);
$diff = $want_secs - $have_secs;
$time += $diff;
return $time;
}