Skip Menu |
 

This queue is for tickets about the DateTime-Format-ICal CPAN distribution.

Report information
The Basics
Id: 43610
Status: open
Priority: 0/
Queue: DateTime-Format-ICal

People
Owner: Nobody in particular
Requestors: jonas [...] paranormal.se
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.09
Fixed in: (no value)



Subject: Data::ICal needs more than what is given by format_datetime()
Download (untitled) / with headers
text/plain 1.3k
A correctly formatted DTSTART with a timezone is given as DTSTART;TZID=US-Eastern:19970902T090000 Notice the ';' rather than a ':' after DTSTART. The row must thus be formatted in a different way if it has a parameter. It is not enough to let format_datetime() return a simple string. That string must be examined in order to determine if a ':' or a ';' should be used. The Data::ICal module has a better way to do it, by giving all the property parameters as a hash along with the value, like this; $vevent->add_property( 'dtstart' => [ $start->datetime, { TZID => $start->time_zone_long_name, }, ], ); That is, the iso8601 format is given as the fist value and the second value is a reference to a hash with all the parameters. That will give a correctly formatted row. Could you create a new method named format_datetime_dataical() or maby return the parameter hash as the second element in the return list if called in list context? Or maby, for compatability sake, add a new parameter to the method. The new return value could be: if( wantarray ) { return( $base, {TZID=>$tz->name} ); } ... A separate suggestion for the same method. It would be nice to be able to specify that you want the result in UTC even if the given date is in a specific tz. Maby by calling DateTime::Format::ICal->format_datetime($dt, {tz=>'UTC'})
Download (untitled) / with headers
text/plain 341b
I've had a first go at fixing this in svn https://svn.unixbeard.net/simon/Data-ICal-DateTime/ can you give that a go and see if it works for you? Also, if you could provide a test script that showed the problem and preferably a round trip from creating the object to ics and back to the object then that would be awesome. Thanks! Simon


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.