Changeset 330
- Timestamp:
- 07/27/06 14:25:22 (2 years ago)
- Files:
-
- 1 modified
-
cybozu2ical/trunk/cybozu2ical (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cybozu2ical/trunk/cybozu2ical
r329 r330 19 19 20 20 our $VERSION = '0.05'; 21 our $ENCODE_NCR = 0;22 21 23 22 my %opt = (conf => 'config.yaml'); … … 26 25 27 26 my $cfg = YAML::LoadFile($opt{conf}); 28 my $tz = DateTime::TimeZone->new(name => $cfg->{time_zone} || 'Asia/Tokyo');29 27 30 28 my $ua = LWP::UserAgent->new(); … … 46 44 my @lines = grep /^\d+,ts\.\d+,/, split(/\r?\n/, $content); 47 45 46 my $tzid = $cfg->{time_zone} || 'Asia/Tokyo'; 47 my $tz = DateTime::TimeZone->new(name => $tzid); 48 48 49 my $vcalendar = Data::ICal->new(); 49 50 $vcalendar->add_properties( … … 52 53 method => 'PUBLISH', 53 54 $cfg->{calname} ? ('X-WR-CALNAME' => $cfg->{calname}) : (), 54 $cfg->{time_zone} ? ('X-WR-TIMEZONE' => $cfg->{time_zone}) : (),55 'X-WR-TIMEZONE' => $tzid 55 56 ); 56 57 … … 82 83 $dt0->add(minutes => 10) : dt2ical($dt1); 83 84 } 84 $vevent->add_properties(dtstart => $dtstart, dtend => $dtend); 85 $vevent->add_properties( 86 dtstart => [$dtstart, { TZID => $tzid }], 87 dtend => [$dtend, { TZID => $tzid }] 88 ); 85 89 } 86 90 … … 99 103 100 104 my $vtimezone = Data::ICal::Entry::TimeZone->new(); 101 $vtimezone->add_properties(tzid => $tz ->name);105 $vtimezone->add_properties(tzid => $tzid); 102 106 103 107 # probably we need to support the Daylight Saving Time … … 119 123 120 124 my $enc = $cfg->{output_encoding} || 'utf8'; 121 print ($enc eq 'ncr')?125 print $enc eq 'ncr' ? 122 126 encode_ncr($vcalendar->as_string) : 123 127 encode($enc, $vcalendar->as_string);
![(please configure the [header_logo] section in trac.ini)](/public/chrome/common/trac_banner.png)