Subject: | Can't output time 00:00 |
I am using Data::ICal to export a calendar to an .ics file and importing
it on an Android phone using iCalSync.
iCalSync doesn't like dates without a time - probably a bug in iCalSync,
but I need to work around it.
Date::ICal skips the time if hours, minutes and seconds aren't true -
maybe it should only skip it they aren't defined?
Patch attached.
Best regards,
Adam
Subject: | output_time_if_defined.patch |
--- ICal.pm_orig 2012-11-23 22:58:19.361238426 +0100
+++ ICal.pm 2012-11-23 22:58:39.076759868 +0100
@@ -284,7 +284,7 @@
# make output in UTC by default
# if we were originally given this time in offset
# form, we'll need to adjust it for output
- if ( $self->hour || $self->min || $self->sec ) {
+ if ( defined $self->hour || defined $self->min || defined $self->sec ) {
$ical =
sprintf( '%04d%02d%02dT%02d%02d%02dZ', $self->year, $self->month,
$self->day, $self->hour, $self->minute, $self->second );