Skip to content

Commit

Permalink
Fix ics timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
hjonin committed Jun 27, 2024
1 parent 9f57483 commit b51d8af
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ See [`sample/event/index.md`](sample/event/index.md) for an example event. Event

### Notes on dates

Dates must be of HTML format, see [here](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#examples) for examples.
Dates must be of ISO 8601 format, see [here](https://github.com/moment/luxon/blob/master/docs/parsing.md#iso-8601) for full examples, or below:

```
2016-05-25
2016-05-25T09:24
```

Either `end` or `duration` is required, but not both. However, if both are provided, `end` prevails on `duration`.

Expand Down
2 changes: 2 additions & 0 deletions calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ const eventToJsonEvent = (event, options = {}) => {
}
return {
...time,
startInputType: "utc",
endInputType: "utc",
...{
title: event.data?.title,
description: event.data?.description,
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b51d8af

Please sign in to comment.