Comments (12)
I removed the default value for X-PUBLISHED-TTL
. This library is for creating .ics
as well as for creating endpoints providing icalendar data for sync. I think the value isnβt needed as default for the most people and it can be setted very easily. The absent of this value is at least not hindering the clients from updating as often as they want.
The unpublished version 0.12 contains breaking changes anyways like the PHP version constraint.
from ical.
I would guess it is respecting X-PUBLISHED-TTL:P1W
1 Week being 168 hours. You can change that with $vCalendar->setPublishedTTL('P1H');
(changes it to one hour).
from ical.
Hey @naneri,
I am not aware of any restriction that can be set in .ics files to prevent the client to update. Maybe you can show more of your problem? How does your generated .ics file look like? How does the code look like that generates the file?
from ical.
public function generateIcal($user_id)
{
$vCalendar = new Calendar(config('app.url'));
$plans = MealPlan::where('user_id', $user_id)->get();
foreach($plans as $plan){
$vEvent = new Event();
$vEvent
->setDtStart(new \DateTime($plan->date))
->setDtEnd(new \DateTime($plan->date))
->setNoTime(true)
->setSummary($plan->type);
$vCalendar->addComponent($vEvent);
}
return response($vCalendar->render())
->withHeaders([
'Content-Type' => 'text/calendar; charset=utf-8',
'Content-Disposition' => 'attachment; filename="cal.ics"'
]);
}
Here is the code.
from ical.
BEGIN:VCALENDAR
VERSION:2.0
PRODID:http://anya.dev
X-PUBLISHED-TTL:P1W
BEGIN:VEVENT
UID:58748a622bdc4
DTSTART;VALUE=DATE:20161229
SEQUENCE:0
TRANSP:OPAQUE
DTEND;VALUE=DATE:20161229
SUMMARY:breakfast
CLASS:PUBLIC
X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
DTSTAMP:20170110T131650Z
END:VEVENT
BEGIN:VEVENT
UID:58748a622bdc4
DTSTART;VALUE=DATE:20161229
SEQUENCE:0
TRANSP:OPAQUE
DTEND;VALUE=DATE:20161229
SUMMARY:breakfast
CLASS:PUBLIC
X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
DTSTAMP:20170110T131650Z
END:VEVENT
BEGIN:VEVENT
UID:58748a622bdc4
DTSTART;VALUE=DATE:20161230
SEQUENCE:0
TRANSP:OPAQUE
DTEND;VALUE=DATE:20161230
SUMMARY:breakfast
CLASS:PUBLIC
X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
DTSTAMP:20170110T131650Z
END:VEVENT
BEGIN:VEVENT
UID:58748a622bdc4
DTSTART;VALUE=DATE:20161230
SEQUENCE:0
TRANSP:OPAQUE
DTEND;VALUE=DATE:20161230
SUMMARY:breakfast
CLASS:PUBLIC
X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
DTSTAMP:20170110T131650Z
END:VEVENT
BEGIN:VEVENT
UID:58748a622bdc4
DTSTART;VALUE=DATE:20170104
SEQUENCE:0
TRANSP:OPAQUE
DTEND;VALUE=DATE:20170104
SUMMARY:lunch
CLASS:PUBLIC
X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
DTSTAMP:20170110T131650Z
END:VEVENT
BEGIN:VEVENT
UID:58748a622bdc4
DTSTART;VALUE=DATE:20170104
SEQUENCE:0
TRANSP:OPAQUE
DTEND;VALUE=DATE:20170104
SUMMARY:snacks
CLASS:PUBLIC
X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
DTSTAMP:20170110T131650Z
END:VEVENT
BEGIN:VEVENT
UID:58748a622bdc4
DTSTART;VALUE=DATE:20170105
SEQUENCE:0
TRANSP:OPAQUE
DTEND;VALUE=DATE:20170105
SUMMARY:breakfast
CLASS:PUBLIC
X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
DTSTAMP:20170110T131650Z
END:VEVENT
BEGIN:VEVENT
UID:58748a622bdc4
DTSTART;VALUE=DATE:20170109
SEQUENCE:0
TRANSP:OPAQUE
DTEND;VALUE=DATE:20170109
SUMMARY:snacks
CLASS:PUBLIC
X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
DTSTAMP:20170110T131650Z
END:VEVENT
BEGIN:VEVENT
UID:58748a622bdc4
DTSTART;VALUE=DATE:20170107
SEQUENCE:0
TRANSP:OPAQUE
DTEND;VALUE=DATE:20170107
SUMMARY:breakfast
CLASS:PUBLIC
X-MICROSOFT-CDO-ALLDAYEVENT:TRUE
DTSTAMP:20170110T131650Z
END:VEVENT
END:VCALENDAR
from ical.
In the generated .ics file I cannot see anything that will prevent the consumer/client to update the information from that file. Normally caching would be the concern of a different layer. Normally the iCal files are transferred using HTTP. Any rule for caching etc. could be made there.
One thing that looks wrong in the generated is that the events have the same UID instead having their own UID that must differ from all others. (I will have a look into that later but this might not be your actual problem here.)
Which version of Outlook are you using? Did you already search for the message and how to avoid it?
from ical.
As a conclusion: to me this problem looks like a problem fro the client rather than from the generated .ics file. You could also try another client instead of Outlook to verify that.
from ical.
@markuspoerschke it seems that the problem is with Microsoft Outlook, it thinks that all .ics set update rate to 168 hours, by default, and for instance on Mac you can sync the events manually or with much higher frequence (like every five minutes at least).
from ical.
@naneri Can I close this issue then?
from ical.
I was really not ready this issue carefully enough.
@jrjohnson Do you have expirience with this property? Do you think the default value of 1 week makes sense? Maybe it is better to drop the default and make it optional?
from ical.
I've personally always set it at one hour - but that makes the most sense for our use case. I would see removing the default as a breaking change for anyone relying on it - but other than that I only have our own usage to compare it to.
from ical.
RFC 7986 introduced a REFRESH-INTERVAL property:
https://www.rfc-editor.org/rfc/rfc7986#section-5.7
from ical.
Related Issues (20)
- Compatibility with PHP 8.1 HOT 1
- Adding custom Calendar properties is not possible without code duplication HOT 4
- Calendar app on the Mac does not accept this ics. HOT 6
- Geographic position is always NULL HOT 1
- No exist Method property in EventFactory HOT 4
- The organizer's e-mail changes the @ to %40 HOT 2
- ICS and calendar agent causing a lot of requests for past events on my asp.net mvc endpoint
- eluceo/ical 2.7.0 conflicts with php 7.4.6 HOT 1
- Invalid iCal generated when DateTimeZone is UTC
- How to cancel an event
- iCal in one line HOT 2
- Cannot set BYMONTHDAY to a comma-separated list
- UTC Format sometimes not recognized on some calendars HOT 2
- Set organizer not working properly
- Reporting a vulnerability
- SSL certificate expired
- Not working with Outlook Calendar
- [FEATURE] Enable TimeSpan work with only start Time
- Psalm error when trying to create a date object
- Documentation link is broken HOT 3
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 ical.