| | 58 | === Timezone UTC |
|---|
| | 59 | --- input config |
|---|
| | 60 | plugins: |
|---|
| | 61 | - module: CustomFeed::Debug |
|---|
| | 62 | config: |
|---|
| | 63 | title: Foo Bar Calendar |
|---|
| | 64 | entry: |
|---|
| | 65 | - date: 2006/10/20 12:34:56 UTC |
|---|
| | 66 | title: Shibuya.pm Tech Talks |
|---|
| | 67 | - module: Publish::iCal |
|---|
| | 68 | config: |
|---|
| | 69 | dir: $FindBin::Bin |
|---|
| | 70 | filename: $::filename |
|---|
| | 71 | --- expected |
|---|
| | 72 | ok -e $::output; |
|---|
| | 73 | my $ical = Data::ICal->new(filename => $::output); |
|---|
| | 74 | is $ical->entries->[0]->property('dtstart')->[0]->value, "20061020T123456Z"; |
|---|
| | 75 | |
|---|
| | 76 | === floating TZ |
|---|
| | 77 | --- input config |
|---|
| | 78 | plugins: |
|---|
| | 79 | - module: CustomFeed::Debug |
|---|
| | 80 | config: |
|---|
| | 81 | title: Foo Bar Calendar |
|---|
| | 82 | entry: |
|---|
| | 83 | - date: 2006/10/20 12:34:56 |
|---|
| | 84 | title: Shibuya.pm Tech Talks |
|---|
| | 85 | - module: Publish::iCal |
|---|
| | 86 | config: |
|---|
| | 87 | dir: $FindBin::Bin |
|---|
| | 88 | filename: $::filename |
|---|
| | 89 | --- expected |
|---|
| | 90 | ok -e $::output; |
|---|
| | 91 | my $ical = Data::ICal->new(filename => $::output); |
|---|
| | 92 | is $ical->entries->[0]->property('dtstart')->[0]->value, "20061020T123456"; |
|---|
| | 93 | is_deeply $ical->entries->[0]->property('dtstart')->[0]->parameters, {}; |
|---|
| | 94 | |
|---|
| | 95 | === TZ without names (JST is converted +0900 on its way) |
|---|
| | 96 | --- input config |
|---|
| | 97 | plugins: |
|---|
| | 98 | - module: CustomFeed::Debug |
|---|
| | 99 | config: |
|---|
| | 100 | title: Foo Bar Calendar |
|---|
| | 101 | entry: |
|---|
| | 102 | - date: 2006/10/20 12:34:56 JST |
|---|
| | 103 | title: Shibuya.pm Tech Talks |
|---|
| | 104 | - module: Publish::iCal |
|---|
| | 105 | config: |
|---|
| | 106 | dir: $FindBin::Bin |
|---|
| | 107 | filename: $::filename |
|---|
| | 108 | --- expected |
|---|
| | 109 | ok -e $::output; |
|---|
| | 110 | my $ical = Data::ICal->new(filename => $::output); |
|---|
| | 111 | is $ical->entries->[0]->property('dtstart')->[0]->value, "20061020T123456"; |
|---|
| | 112 | is_deeply $ical->entries->[0]->property('dtstart')->[0]->parameters, {}; |
|---|
| | 113 | |
|---|
| | 114 | === Fixed TimeZone |
|---|
| | 115 | --- input config |
|---|
| | 116 | global: |
|---|
| | 117 | timezone: Asia/Tokyo |
|---|
| | 118 | plugins: |
|---|
| | 119 | - module: CustomFeed::Debug |
|---|
| | 120 | config: |
|---|
| | 121 | title: Foo Bar Calendar |
|---|
| | 122 | entry: |
|---|
| | 123 | - date: 2006/10/20 12:34:56 |
|---|
| | 124 | title: Shibuya.pm Tech Talks |
|---|
| | 125 | - module: Filter::FloatingDateTime |
|---|
| | 126 | - module: Publish::iCal |
|---|
| | 127 | config: |
|---|
| | 128 | dir: $FindBin::Bin |
|---|
| | 129 | filename: $::filename |
|---|
| | 130 | --- expected |
|---|
| | 131 | ok -e $::output; |
|---|
| | 132 | my $ical = Data::ICal->new(filename => $::output); |
|---|
| | 133 | is $ical->entries->[0]->property('dtstart')->[0]->value, "20061020T123456"; |
|---|
| | 134 | is_deeply $ical->entries->[0]->property('dtstart')->[0]->parameters, { TZID => 'Asia/Tokyo' }; |
|---|