Merge branch 'spidev' into 'master'
Kalender Update See merge request fronk/thetool!1854
This commit is contained in:
@@ -92,6 +92,19 @@ class CalendarModel
|
|||||||
$unixtimestamp = $date->getTimestamp() + $cest;
|
$unixtimestamp = $date->getTimestamp() + $cest;
|
||||||
return date('Y-m-d H:i:s', $unixtimestamp);
|
return date('Y-m-d H:i:s', $unixtimestamp);
|
||||||
}
|
}
|
||||||
|
public static function convertMillisecondsToTimestamp($milliseconds)
|
||||||
|
{
|
||||||
|
$timestamp = $milliseconds / 1000;
|
||||||
|
$date = new DateTime();
|
||||||
|
$date->setTimestamp($timestamp);
|
||||||
|
$date->setTimezone(new DateTimeZone('Europe/Berlin'));
|
||||||
|
if ($date->format('I') == 1) {
|
||||||
|
$offset = 7200;
|
||||||
|
} else {
|
||||||
|
$offset = 3600;
|
||||||
|
}
|
||||||
|
return $timestamp - $offset;
|
||||||
|
}
|
||||||
|
|
||||||
public static function replace_unicode_sequences($string)
|
public static function replace_unicode_sequences($string)
|
||||||
{
|
{
|
||||||
@@ -646,12 +659,8 @@ WHERE `TimerecordingCategory`.`hourday`!='1' AND `TimerecordingCategory`.`hourda
|
|||||||
|
|
||||||
public static function updateCalendarEvent($r, $me)
|
public static function updateCalendarEvent($r, $me)
|
||||||
{
|
{
|
||||||
$description = ($r->description);
|
$start = CalendarModel::convertMillisecondsToTimestamp($r->start);
|
||||||
$attachments = ($r->attachments);
|
$end = CalendarModel::convertMillisecondsToTimestamp($r->end);
|
||||||
$location = ($r->location);
|
|
||||||
$title = ($r->title);
|
|
||||||
$start = ((($r->start - 7200000) / 1000));
|
|
||||||
$end = ((($r->end - 7200000) / 1000));
|
|
||||||
|
|
||||||
|
|
||||||
if ($title) {
|
if ($title) {
|
||||||
|
|||||||
Reference in New Issue
Block a user