Giter Site home page Giter Site logo

Comments (7)

kbarendrecht avatar kbarendrecht commented on August 25, 2024 1

I just tried it, and a .ics file exported form Microsoft Outlook can be imported with Google Calendar.
The .ics file has rules such as TZID:W. Europe Standard Time, DTSTART;TZID="W. Europe Standard Time":20180802T110000, DTEND;TZID="W. Europe Standard Time":20180802T113000.

Also found out that it's even allowed by the iCal specification. It does not require a default for the timezones, just suggests the usage of Olson's timezone database.

from php-rrule.

kbarendrecht avatar kbarendrecht commented on August 25, 2024 1

Most of the iCals I tested from Exchange are parsed correctly but found some still throw an error:
InvalidArgumentException: Invalid UNTIL property: The value of the UNTIL rule part MUST be a date if DTSTART is a date. in /****/vendor/rlanvin/php-rrule/src/RfcParser.php:166.

A VEVENT from on of the faulty exports from Exchange:

BEGIN:VEVENT
DESCRIPTION:\n\n
RRULE:FREQ=YEARLY;UNTIL=20191231T230000Z;INTERVAL=1;BYMONTHDAY=1;BYMONTH=1
SUMMARY:****
DTSTART;VALUE=DATE:20200101
DTEND;VALUE=DATE:20200102
UID:040000008200E00074C5B7101A82E00800000000400EA87920FAD201000000000000000
 010000000174A06672567FE4CB31A7E0909D8F5B2
CLASS:PUBLIC
PRIORITY:5
DTSTAMP:20191010T131152Z
TRANSP:OPAQUE
STATUS:CONFIRMED
SEQUENCE:1
LOCATION:
X-MICROSOFT-CDO-APPT-SEQUENCE:1
X-MICROSOFT-CDO-BUSYSTATUS:FREE
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-INSTTYPE:1
X-MICROSOFT-DISALLOW-COUNTER:FALSE
END:VEVENT

This shouldn't be "fixed" though since php-rrule has implemented the spec correctly on this, unlike Microsoft's Exchange / Outlook Web App. 👍

Thank you for your efforts on this!

from php-rrule.

rlanvin avatar rlanvin commented on August 25, 2024

Hello, thanks for reporting this. What are you trying to do exactly? Could you provide the code that triggers this exception?

To be honest, I'm a bit reluctant to include specific code for non-standard timezones, so let's see what is your use case.

from php-rrule.

kbarendrecht avatar kbarendrecht commented on August 25, 2024

The error occurerd after tyring to parse a RRule from a Microsoft Exchange Calender iCal export.
/****/vendor/rlanvin/php-rrule/src/RRule.php(199): RRule\RfcParser::parseRRule('DTSTART;TZID=W. Europe Standard Time RRULE:????', NULL)

EDIT: I see the RRule is missing in my example. I got this from logfiles, the code that was executed is not static and sadly, the RRule was truncated. But I suspect the specific RRule doesn't matter.

I was already doubting if you would want to add it in this project, since it is very clean right now. 😄 I can add the translation from MS-timezone to Php-timezone in my own project aswell. I did want to let you know though, since it is used by Microsoft, and used a lot, more people might want this.

from php-rrule.

rlanvin avatar rlanvin commented on August 25, 2024

@kbarendrecht I've been thinking about it a bit, and honestly I can't believe Microsoft is still doing its thing of using non-standard crap... That being said, do you know if such RRule can be imported, e.g. in Google Calendar? I'd say, if it's not supported there, then I will not care. If it's supported by other 3rd party tools, I might also just add it to the lib... I'm also happy to get more feedback from everyone who would have the same issue.

from php-rrule.

rlanvin avatar rlanvin commented on August 25, 2024

@kbarendrecht I added support in master. It's somewhat basic for now - based on what I saw in Sabre project, it seems there are a LOT more special cases - but it should cover your use case. Feel free to test (using dev-master in composer) and let me know your feedback.

from php-rrule.

rlanvin avatar rlanvin commented on August 25, 2024

@kbarendrecht I released v2.2.0 with support for Windows Timezone. For the other problem you are mentioning, yeah it's basically not compliant with the specs... I guess the approach here would be to relax the validation, but I'm not a big fan as this opens the door to undefined behaviors (there's is a reason those are not part of the RFC I guess). Thanks for reporting this bug!

from php-rrule.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.