diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/event.php | 12 | ||||
-rw-r--r-- | include/network.php | 15 |
2 files changed, 16 insertions, 11 deletions
diff --git a/include/event.php b/include/event.php index e54a172c2..e41bf2db7 100644 --- a/include/event.php +++ b/include/event.php @@ -536,20 +536,10 @@ function event_import_ical($ical, $uid) { } $dtstart = $ical->DTSTART->getDateTime(); + $ev['adjust'] = (($ical->DTSTART->isFloating()) ? 1 : 0); // logger('dtstart: ' . var_export($dtstart,true)); - - switch($dtstart->timezone_type) { - case VObject\Property\DateTime::UTC : - $ev['adjust'] = 0; - break; - case VObject\Property\DateTime::LOCALTZ : - default: - $ev['adjust'] = 1; - break; - } - $ev['start'] = datetime_convert((($ev['adjust']) ? 'UTC' : date_default_timezone_get()),'UTC', $dtstart->format(\DateTime::W3C)); diff --git a/include/network.php b/include/network.php index 395641b73..9f68d3df3 100644 --- a/include/network.php +++ b/include/network.php @@ -2128,3 +2128,18 @@ function deliverable_singleton($channel_id,$xchan) { return false; } + + +function get_repository_version($branch = 'master') { + + $path = "https://raw.githubusercontent.com/redmatrix/hubzilla/$branch/boot.php"; + + $x = z_fetch_url($path); + if($x['success']) { + $y = preg_match('/define(.*?)STD_VERSION(.*?)([0-9.].*)\'/',$x['body'],$matches); + if($y) + return $matches[3]; + } + return '?.?'; + +} |