<?php
use Friendica\Core\L10n;
+use Friendica\Util\Temporal;
/**
* @param mixed $obj
else $type = Sabre\VObject\Property\DateTime::LOCALTZ;
$datetime_start = new Sabre\VObject\Property\DateTime("DTSTART");
- $datetime_start->setDateTime(new DateTime(date("Y-m-d H:i:s", IntVal($_REQUEST["CalendarStartTime"]))), $type);
+ $datetime_start->setDateTime(new DateTime(date(Temporal::MYSQL, IntVal($_REQUEST["CalendarStartTime"]))), $type);
$datetime_end = new Sabre\VObject\Property\DateTime("DTEND");
- $datetime_end->setDateTime(new DateTime(date("Y-m-d H:i:s", IntVal($_REQUEST["CalendarEndTime"]))), $type);
+ $datetime_end->setDateTime(new DateTime(date(Temporal::MYSQL, IntVal($_REQUEST["CalendarEndTime"]))), $type);
$component->add($datetime_start);
$component->add($datetime_end);
else $type = Sabre\VObject\Property\DateTime::LOCALTZ;
$datetime_start = new Sabre\VObject\Property\DateTime("DTSTART");
- $datetime_start->setDateTime(new DateTime(date("Y-m-d H:i:s", IntVal($_REQUEST["CalendarStartTime"]))), $type);
+ $datetime_start->setDateTime(new DateTime(date(Temporal::MYSQL, IntVal($_REQUEST["CalendarStartTime"]))), $type);
$datetime_end = new Sabre\VObject\Property\DateTime("DTEND");
- $datetime_end->setDateTime(new DateTime(date("Y-m-d H:i:s", IntVal($_REQUEST["CalendarEndTime"]))), $type);
+ $datetime_end->setDateTime(new DateTime(date(Temporal::MYSQL, IntVal($_REQUEST["CalendarEndTime"]))), $type);
$component->__unset("DTSTART");
$component->__unset("DTEND");