mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-09-19 05:59:02 +00:00
RepeatRule bug fixes during testing.
This commit is contained in:
parent
6b495b6556
commit
4be420e8ec
@ -39,7 +39,7 @@ class RepeatRuleDateTime extends DateTime {
|
|||||||
public static $Format = 'c';
|
public static $Format = 'c';
|
||||||
private $tzid;
|
private $tzid;
|
||||||
|
|
||||||
public function __construct($date = null, DateTimeZone $dtz = null) {
|
public function __construct($date = null, $dtz = null) {
|
||||||
if (preg_match('/;?TZID=([^:]+):(\d{8}(T\d{6})?)(Z)?/', $date, $matches) ) {
|
if (preg_match('/;?TZID=([^:]+):(\d{8}(T\d{6})?)(Z)?/', $date, $matches) ) {
|
||||||
if ( isset($matches[4]) && $matches[4] == 'Z' ) {
|
if ( isset($matches[4]) && $matches[4] == 'Z' ) {
|
||||||
$dtz = new DateTimeZone('UTC');
|
$dtz = new DateTimeZone('UTC');
|
||||||
@ -85,7 +85,7 @@ class RepeatRuleDateTime extends DateTime {
|
|||||||
|
|
||||||
|
|
||||||
public function UTC() {
|
public function UTC() {
|
||||||
$gmt = parent::__clone();
|
$gmt = clone($this);
|
||||||
if ( isset($this->tzid) && $this->tzid != 'UTC' ) {
|
if ( isset($this->tzid) && $this->tzid != 'UTC' ) {
|
||||||
$dtz = parent::getTimezone();
|
$dtz = parent::getTimezone();
|
||||||
$offset = $dtz->getOffset($gmt);
|
$offset = $dtz->getOffset($gmt);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user