Skip to content

Recurrence and Exclude dates are converted incorrectly for locations east of UTC #234

@sdetweil

Description

@sdetweil

the code parses the RECURRENCE-ID and EXDATE strings into date() objects.

then extracts the date string to use as the lookup key..

except it uses toISOString()

curr.recurrenceid.toISOString().slice(0, 10)

toISOString uses UTC offset 0.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString#:~:text=Syntax-,Date.prototype.toISOString(),denoted%20by%20the%20suffix%20Z%20.
(see the 'Z' at the end)

which for the person in Germany is yesterday . oops...

EXDATE;VALUE=DATE:20221123
RECURRENCE-ID;VALUE=DATE:20221123

as no time is specified, these are local time..

i created another function to return the local time date.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions