Comments (7)
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.
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.
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.
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.
@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.
@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.
@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)
- addExRule not working for me HOT 4
- Drop support for PHP < 7.3 HOT 2
- Daylight Savings Time issue with PHP 8.1 HOT 13
- How to create Rrule for every day from X to Y? HOT 4
- How to use exdate with byhour? HOT 3
- Question: Performance optimization when calculating occurrences using multiple rules HOT 3
- exRule and addRule conflict HOT 3
- More forgiving DTSTART behavior when using only date for UNTIL HOT 2
- Nested exrules HOT 2
- occursAt sometimes failing HOT 2
- Problem with getOccurrencesAfter HOT 9
- Removing all dates that are inside a DatePeriod from Rset HOT 1
- bi-weekly occurance wrong HOT 3
- dtstart vs. Repeat Dates / Current Time Not Considered in Calculation HOT 5
- humanreadable not so much HOT 2
- Looking for a way to add DTEND HOT 1
- Exrul not working
- Add alias methods for better reading of code HOT 1
- Legacy Code - Can I 'require_once' instead of composer ? HOT 2
- Danish translation file attached
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-rrule.