Menu

#66 midnight versus no time not working correctly

open
nobody
Date-ICal (2)
5
2012-05-22
2007-07-31
No

I am in Seattle, so that would affect the default timezone.

I have tested on Ubuntu 6.10 running in VMWare Fusion 1.0 for Mac.

I get values with either setting datetimes or using the "add" method that make the resulting *.ics files not behave correctly in the Mac iCal program.

Here's a script to show what I'm seeing:

!/usr/bin/perl

use Date::ICal;

my $di1 = Date::ICal->new(
day => 31,
month => 7,
year => 2007,
hour => 16,
min => 59,
sec => 59
);

displays '20070731T235959Z' - correct

print $di1->ical . "\n";

my $di2 = Date::ICal->new(
day => 31,
month => 7,
year => 2007,
hour => 17,
min => 0,
sec => 0
);

displays '20070801Z' - incorrect!

should display '20070801T000000Z

print $di2->ical . "\n";

my $di3 = Date::ICal->new(
day => 31,
month => 7,
year => 2007,
hour => 17,
min => 0,
sec => 1
);

displays '20070801T000001Z' - correct

print $di3->ical . "\n";

exit 0;

Discussion


Log in to post a comment.

MongoDB Logo MongoDB