|
From: Jeroen v. V. <je...@va...> - 2013-11-22 13:25:19
|
Hi,
When parsing unknown timezones like 'W. Europe Standard Time', davical
responds with an error:
ERROR:Could not recognize timezone "W. Europe Standard Time" - will use
floating time
I'd rather prefer to use the server default timezone for those floating
times rather than hardcoded UTC.
Below is a patch to fix this issue. You should maybe set date.timezone
in /etc/php.ini to your default timezone.
# git diff RRule-v2.php
diff --git a/inc/RRule-v2.php b/inc/RRule-v2.php
index 785de45..303bb2c 100644
--- a/inc/RRule-v2.php
+++ b/inc/RRule-v2.php
@@ -50,14 +50,14 @@ class RepeatRuleTimeZone extends DateTimeZone {
$this->tz_defined = $olson;
}
catch (Exception $e) {
- dbg_error_log( 'ERROR', 'Could not handle timezone "%s" (%s) -
will use floating time', $in_dtz, $olson );
- parent::__construct('UTC');
+ dbg_error_log( 'ERROR', 'Could not handle timezone "%s" (%s) -
will use floating time %s', $in_dtz, $olson, date_default_timezone_get());
+ parent::__construct(date_default_timezone_get());
$this->tz_defined = false;
}
}
else {
- dbg_error_log( 'ERROR', 'Could not recognize timezone "%s" - will
use floating time', $in_dtz );
- parent::__construct('UTC');
+ dbg_error_log( 'ERROR', 'Could not recognize timezone "%s" - will
use floating time %s', $in_dtz, date_default_timezone_get());
+ parent::__construct(date_default_timezone_get());
$this->tz_defined = false;
}
}
Please review and apply,
Jeroen
|