value-class-pattern parsing does not handle timezone in separate element
sknebel opened this issue · 0 comments
sknebel commented
(See also microformats/php-mf2#126 for the same bug in php-mf2)
The following snippet has date, time and timezone offset in three different elements, using the value-class-pattern.
<div class="h-event">
<span class="e-summary">HomebrewWebsiteClub Berlin</span> will be next on
<span class="dt-start">
<span class="value">2017-05-31</span>, from
<span class="value">19:00</span> (UTC<span class="value">+02:00</span>)
</span> to <span class="dt-end">21:00</span>.</div>
I would have expected a value of 2017-05-31 19:00+02:00
for start
, per http://microformats.org/wiki/value-class-pattern#Date_and_time_parsing
[…] the parser assembles the overall datetime value by concatenating the specific date, " " (space character) and specific time (if time was specified, with 00 minutes implied if no minutes are provided), and specific timezone (if timezone and a specific time was specified)
Instead the timezone is dropped:
"start": [ "2017-05-31 19:00" ]