<?php
use Friendica\Core\L10n;
+use Friendica\Util\Temporal;
/**
* @param wdcal_local $localization
$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", $ts_start)), $type);
+ $datetime_start->setDateTime(new DateTime(date(Temporal::MYSQL, $ts_start)), $type);
$datetime_end = new Sabre\VObject\Property\DateTime("DTEND");
- $datetime_end->setDateTime(new DateTime(date("Y-m-d H:i:s", $ts_end)), $type);
+ $datetime_end->setDateTime(new DateTime(date(Temporal::MYSQL, $ts_end)), $type);
$component->__unset("DTSTART");
$component->__unset("DTEND");
$date = $localization->date_local2timestamp($_REQUEST["rec_until_date"]);
$part_until = ";UNTIL=" . date("Ymd", $date);
$datetime_until = new Sabre\VObject\Property\DateTime("UNTIL");
- $datetime_until->setDateTime(new DateTime(date("Y-m-d H:i:s", $date)), Sabre\VObject\Property\DateTime::DATE);
+ $datetime_until->setDateTime(new DateTime(date(Temporal::MYSQL, $date)), Sabre\VObject\Property\DateTime::DATE);
break;
case "count":
$part_until = ";COUNT=" . IntVal($_REQUEST["rec_until_count"]);
if (isset($_REQUEST["rec_exceptions"])) {
$arr = array();
foreach ($_REQUEST["rec_exceptions"] as $except) {
- $arr[] = new DateTime(date("Y-m-d H:i:s", $except));
+ $arr[] = new DateTime(date(Temporal::MYSQL, $except));
}
/** @var Sabre\VObject\Property\MultiDateTime $prop */
$prop = Sabre\VObject\Property::create("EXDATE");