Skip to content

Commit f5b1c26

Browse files
author
NewSkyLine
committed
prob fixed timezone?
1 parent ecb2a15 commit f5b1c26

4 files changed

Lines changed: 23 additions & 3 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ jobs:
3434
- name: Install dependencies
3535
run: npm install
3636
- name: Build
37-
run: npm run build
38-
- name: Generate
3937
run: npm run dev
38+
# - name: Generate
39+
# run: npm run dev
4040
- name: Setup Pages
4141
uses: actions/configure-pages@v3
4242
- name: Upload artifact

package-lock.json

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"typescript": "^5.3.3"
2020
},
2121
"dependencies": {
22+
"@touch4it/ical-timezones": "^1.9.0",
2223
"ical-generator": "^6.0.1",
2324
"ics": "^3.7.2",
2425
"luxon": "^3.4.4",

src/app.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { parseTimetable } from "./untis_utils/data";
55
import * as fs from "fs";
66
import { generateFileList } from "./html_gen/schema";
77
import ical, { ICalCalendarMethod } from "ical-generator";
8+
import setZone, { DateTime } from "luxon";
9+
import * as icaltz from "@touch4it/ical-timezones";
810

911
(async () => {
1012
const untis = new WebUntis(
@@ -26,7 +28,15 @@ import ical, { ICalCalendarMethod } from "ical-generator";
2628
events = parseTimetable(timetable);
2729

2830
// Write ics file
29-
const calendar = ical({ name: "Stundenplan", timezone: "Europe/Vienna" });
31+
const calendar = ical({
32+
name: "Stundenplan",
33+
method: ICalCalendarMethod.PUBLISH,
34+
});
35+
36+
calendar.timezone({
37+
name: "" as string,
38+
generator: icaltz.getVtimezoneComponent,
39+
});
3040

3141
events.forEach((event) => {
3242
calendar.createEvent({

0 commit comments

Comments
 (0)