Merge pull request #268 from emrysal/hotfix/ics-month-error
Fixes #266: ICS event is off by one month
This commit is contained in:
commit
81246edab2
2 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ export default function createNewEventEmail(calEvent: CalendarEvent, options: an
|
||||||
|
|
||||||
const icalEventAsString = (calEvent: CalendarEvent): string => {
|
const icalEventAsString = (calEvent: CalendarEvent): string => {
|
||||||
const icsEvent = createEvent({
|
const icsEvent = createEvent({
|
||||||
start: dayjs(calEvent.startTime).utc().toArray().slice(0, 6),
|
start: dayjs(calEvent.startTime).utc().toArray().slice(0, 6).map((v, i) => i === 1 ? v + 1 : v),
|
||||||
startInputType: 'utc',
|
startInputType: 'utc',
|
||||||
productId: 'calendso/ics',
|
productId: 'calendso/ics',
|
||||||
title: `${calEvent.type} with ${calEvent.attendees[0].name}`,
|
title: `${calEvent.type} with ${calEvent.attendees[0].name}`,
|
||||||
|
|
|
@ -38,7 +38,7 @@ export default function Success(props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const event = createEvent({
|
const event = createEvent({
|
||||||
start: date.utc().toArray().slice(0, 6),
|
start: date.utc().toArray().slice(0, 6).map((v, i) => i === 1 ? v + 1 : v),
|
||||||
startInputType: 'utc',
|
startInputType: 'utc',
|
||||||
title: eventName,
|
title: eventName,
|
||||||
description: props.eventType.description,
|
description: props.eventType.description,
|
||||||
|
|
Loading…
Reference in a new issue