$vcalendar->add('VEVENT', array( 'SUMMARY' => 'Beachsoccer 2014', 'LOCATION' => 'SKG Arena ,Bickenbach', ));
$vcalendar->add( 'DTSTART', new DateTime('2014-06-27'), array( 'VALUE' => 'DATE' ));$vcalendar->add( 'DTEND', new DateTime('2014-06-29'), array( 'VALUE' => 'DATE' ));BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Sabre//Sabre VObject 3.1.3//EN
CALSCALE:GREGORIAN
DTSTART;TZID=Europe/Berlin;VALUE=DATE:20140627T000000
DTEND;TZID=Europe/Berlin;VALUE=DATE:20140629T000000
BEGIN:VEVENT
SUMMARY:Beachsoccer 2014
LOCATION:SKG Arena \,Bickenbach
END:VEVENT
END:VCALENDAR
DTSTART;TZID=Europe/Berlin;VALUE=DATE-TIME:20140627T000000DTSTART;VALUE=DATE-TIME:20140627T000000Z
or
DTSTART;VALUE=DATE:20140627
or
DTSTART:20140627
Cheers,--
You received this message because you are subscribed to the Google Groups "SabreDAV Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sabredav-discu...@googlegroups.com.
To post to this group, send email to sabredav...@googlegroups.com.
Visit this group at http://groups.google.com/group/sabredav-discuss.
For more options, visit https://groups.google.com/groups/opt_out.
Maybe because you say it's a date but you are submitting a DateTime?
And a date does not have a TIMEzone.
$vevent->add( 'DTSTART', '20140627', array( 'VALUE' => 'DATE' ));$dtstart = $vevent->add( 'DTSTART', null,
array( 'VALUE' => 'DATE' ));
$dtstart->setValue(new DateTime('2014-06-27'));
3. Bonus:
$vevent->add( 'DTSTART', (new DateTime('2014-06-27'))->format('Ymd'), array( 'VALUE' => 'DATE' ));
Note though, that in your example, you set the DTSTART and DTEND on the VCALENDAR object, which is wrong regardless. DTSTART and DTEND are children of the VEVENT object.
Evert
On Wednesday, March 5, 2014 6:09:37 PM UTC-5, IngoRatsdorf wrote:Maybe because you say it's a date but you are submitting a DateTime?
And a date does not have a TIMEzone.
Actually.. it's a bug.
.. which is now fixed on the master branch of sabre/vobject.
$vcalendar = new VObject\Component\VCalendar();
$vevent = $vcalendar->add('VEVENT', array( 'SUMMARY' => 'Beachsoccer 2014', 'LOCATION' => 'SKG Arena ,Bickenbach', ));
$vevent->add( 'DTSTART', '20140627', array( 'VALUE' => 'DATE' ));
$vevent->add( 'DTEND', '20140630', array( 'VALUE' => 'DATE' ));