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

Invalid VTIMEZONE #141

Closed
scott-k-mitchell opened this issue Sep 16, 2016 · 1 comment
Closed

Invalid VTIMEZONE #141

scott-k-mitchell opened this issue Sep 16, 2016 · 1 comment

Comments

@scott-k-mitchell
Copy link

scott-k-mitchell commented Sep 16, 2016

EDIT: I see that this concern was raised in Issue #58. To summarize, you are aware that the serialized VTIMEZONE result does not conform to the standard and fixing it is a low priority.

I am trying to create a iCalendar file that specifies the time zones. According to this page in the Wiki, https://github.com/rianjs/ical.net/wiki/Working-with-time-zones, we are to accomplish this accordingly:

calendar.AddTimeZone(new VTimeZone("America/New_York"));

I've done that, and I've specified the timezone as part of the CalDateTime constructor (e.g., new CalDateTime(myDateAndTime, "America/New_York")), but what gets serialized does not validate. In the VTIMEZONE section it only specified the TZID, it does not include the rules for standard and daylight savings times, the UTC offset, etc.

Here's the result:

BEGIN:VCALENDAR
PRODID:-//EDU Business Solutions//SchedjIt//EN
VERSION:1.0
BEGIN:VTIMEZONE
TZID:America/Los_Angeles
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20160916T214959Z
DTSTART;TZID=America/Los_Angeles:20161202T173000
SEQUENCE:0
UID:00901ec8-4546-4ad5-a69d-26e81d69d278
END:VEVENT
END:VCALENDAR

But when I validate the file, I get this error:

At least one STANDARD or DAYLIGHT property must be defined here near line # 4

Am I missing something here, or are timezones not yet implemented?

Thanks

@rianjs
Copy link
Collaborator

rianjs commented Oct 3, 2016

@scott-k-mitchell - As I understand your issue, you want the time zones specified at the VCALENDAR level. I'm going to close this as a duplicate of #58 (thanks for linking to it). If you disagree, please re-open.

I'm also going to comment on #58 regarding my thinking RE: time zones. I've changed my mind a bit.

@rianjs rianjs closed this as completed Oct 3, 2016
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