do not change default timezone in parse_ical_file()
(cherry picked from commit f1b54cf0a4
)
This commit is contained in:
parent
e64a7b87a8
commit
24cb04c346
@ -760,13 +760,6 @@ function parse_ical_file($f,$uid) {
|
|||||||
|
|
||||||
$s = @file_get_contents($f);
|
$s = @file_get_contents($f);
|
||||||
|
|
||||||
// Change the current timezone to something besides UTC.
|
|
||||||
// Doesn't matter what it is, as long as it isn't UTC.
|
|
||||||
// Save the current timezone so we can reset it when we're done processing.
|
|
||||||
|
|
||||||
$saved_timezone = date_default_timezone_get();
|
|
||||||
date_default_timezone_set('Australia/Sydney');
|
|
||||||
|
|
||||||
$ical = VObject\Reader::read($s);
|
$ical = VObject\Reader::read($s);
|
||||||
|
|
||||||
if($ical) {
|
if($ical) {
|
||||||
@ -782,8 +775,6 @@ function parse_ical_file($f,$uid) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
date_default_timezone_set($saved_timezone);
|
|
||||||
|
|
||||||
if($ical)
|
if($ical)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user