diff --git a/lib/Kolab/FreeBusy/Utils.php b/lib/Kolab/FreeBusy/Utils.php --- a/lib/Kolab/FreeBusy/Utils.php +++ b/lib/Kolab/FreeBusy/Utils.php @@ -178,7 +178,7 @@ { // use date from HTTP query if (!empty($_GET['dtstart'])) { - return self::periodStartDT()->format('u'); + return self::periodStartDT()->format('U'); } // Should probably be a setting. For now, do 8 weeks in the past @@ -194,8 +194,14 @@ { // use date from HTTP query if (!empty($_GET['dtstart']) && - ($dtstart = \rcube_utils::anytodatetime(filter_input(INPUT_GET, 'dtstart', FILTER_SANITIZE_STRING)))) { - return $dtstart; + ($dtstart = filter_input(INPUT_GET, 'dtstart', FILTER_SANITIZE_STRING)) + ) { + try { + return new \DateTime($dtstart, new \DateTimezone('UTC')); + } + catch (Exception $e) { + // ignore + } } // Should probably be a setting. For now, do 8 weeks in the past @@ -211,7 +217,7 @@ { // use date from HTTP query if (!empty($_GET['dtend'])) { - return self::periodEndDT()->format('u'); + return self::periodEndDT()->format('U'); } // Should probably be a setting. For now, do 16 weeks into the future @@ -227,8 +233,14 @@ { // use date from HTTP query if (!empty($_GET['dtend']) && - ($dtend = \rcube_utils::anytodatetime(filter_input(INPUT_GET, 'dtend', FILTER_SANITIZE_STRING)))) { - return $dtend; + ($dtend = filter_input(INPUT_GET, 'dtend', FILTER_SANITIZE_STRING)) + ) { + try { + return new \DateTime($dtend, new \DateTimezone('UTC')); + } + catch (Exception $e) { + // ignore + } } // Should probably be a setting. For now, do 8 weeks in the past @@ -259,4 +271,4 @@ return $dummy; } -} \ No newline at end of file +} diff --git a/public_html/index.php b/public_html/index.php --- a/public_html/index.php +++ b/public_html/index.php @@ -74,6 +74,8 @@ #header('Content-type: text/calendar; charset=utf-8', true); header('Content-type: text/plain; charset=utf-8', true); + list($uri, $args) = explode('?', $uri); + // analyse request $url = array_filter(explode('/', $uri)); $user = strtolower(array_pop($url));