calendar: revert back to UTC strings for dates due to better legibility. Strip timezone info from UTC string and always treat values as UTC.

This commit is contained in:
Mario Vavti
2019-07-11 11:12:27 +02:00
parent da7912b879
commit 407b02bde8
3 changed files with 30 additions and 30 deletions

View File

@@ -278,11 +278,11 @@ class Cdav extends Controller {
$allday = $_REQUEST['allday'];
$title = $_REQUEST['title'];
$start = datetime_convert($tz, 'UTC', $_REQUEST['dtstart']);
$start = datetime_convert('UTC', 'UTC', $_REQUEST['dtstart']);
$dtstart = new \DateTime($start);
if($_REQUEST['dtend']) {
$end = datetime_convert($tz, 'UTC', $_REQUEST['dtend']);
$end = datetime_convert('UTC', 'UTC', $_REQUEST['dtend']);
$dtend = new \DateTime($end);
}
$description = $_REQUEST['description'];
@@ -369,10 +369,10 @@ class Cdav extends Controller {
$uri = $_REQUEST['uri'];
$title = $_REQUEST['title'];
$start = datetime_convert($tz, 'UTC', $_REQUEST['dtstart']);
$start = datetime_convert('UTC', 'UTC', $_REQUEST['dtstart']);
$dtstart = new \DateTime($start);
if($_REQUEST['dtend']) {
$end = datetime_convert($tz, 'UTC', $_REQUEST['dtend']);
$end = datetime_convert('UTC', 'UTC', $_REQUEST['dtend']);
$dtend = new \DateTime($end);
}
$description = $_REQUEST['description'];
@@ -442,10 +442,10 @@ class Cdav extends Controller {
$allday = $_REQUEST['allday'];
$uri = $_REQUEST['uri'];
$start = datetime_convert($tz, 'UTC', $_REQUEST['dtstart']);
$start = datetime_convert('UTC', 'UTC', $_REQUEST['dtstart']);
$dtstart = new \DateTime($start);
if($_REQUEST['dtend']) {
$end = datetime_convert($tz, 'UTC', $_REQUEST['dtend']);
$end = datetime_convert('UTC', 'UTC', $_REQUEST['dtend']);
$dtend = new \DateTime($end);
}