Skip to content
This repository was archived by the owner on Mar 30, 2024. It is now read-only.

Commit f54a044

Browse files
committed
Fix ics timezone error
1 parent aeb4a21 commit f54a044

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
latest
2-
0.5.1
2+
0.5.2
33
0.5
44
0

php/core/Calendar.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@
1414
class Calendar {
1515

1616
private const CAL_EOL = "\r\n";
17-
private string $timezone = "";
1817

1918
public function __construct( Login $login ) {
2019
$this->login = $login;
21-
$this->timezone = Config::getTimezone()->getName();
2220
}
2321

2422
public function generateICS(DataAccess $da) : string {
@@ -65,7 +63,7 @@ private function calEvent(string $name, string $category, int $begin, int $end)
6563
}
6664

6765
private function calTimeRow(int $time, string $rowname) : string {
68-
return $rowname . ';TZID=' . $this->timezone . ':'. date('Ymd\THis', $time ) .'Z' . self::CAL_EOL;
66+
return $rowname . ':'. gmdate('Ymd\THis', $time ) .'Z' . self::CAL_EOL;
6967
}
7068

7169
public function getLink(DataAccess $da) : string {

0 commit comments

Comments
 (0)