Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert timezone/location/time information #9

Open
Masterxilo opened this issue Aug 6, 2019 · 1 comment
Open

Convert timezone/location/time information #9

Masterxilo opened this issue Aug 6, 2019 · 1 comment

Comments

@Masterxilo
Copy link

DTSTART;TZID=America/New_York:20130802T200000
DTEND;TZID=America/New_York:20130802T203000

is converted to

    startDate: '20130802T200000',
    endDate: '20130802T203000',

This datetime conversion:

  • is not ready for being used in js (e.g. converted to Date): new Date('20130802T200000') gives Invalid Date
  • loses the timezone information (TZID)

A better format might be: DTSTART;TZID=America/New_York:20130802T200000 is converted to

dtstart: {
original: "20130802T200000",
tzid: "America/New_York",
toISOString: "2019-08-06T08:58:13.614Z" // time is just an example
}```

* consider to preserve the original key name "DTSTART/dtstart" -> there is no reason to change all of them
* in any startDate is not a correct translation, because the key includes a time


Required for #8
@AleixFerre
Copy link

This just happened to me aswell. Is there any solution to fix this easily?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants