Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to recognize timezone in extra value-class-pattern-element #126

Closed
sknebel opened this issue May 29, 2017 · 2 comments
Closed

Fails to recognize timezone in extra value-class-pattern-element #126

sknebel opened this issue May 29, 2017 · 2 comments

Comments

@sknebel
Copy link
Member

sknebel commented May 29, 2017

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 completely dropped: http://pin13.net/mf2/?id=20170529135806714

"properties": {
                  
                "start": ["2017-05-31T19:00"],
                
@Zegnat
Copy link
Member

Zegnat commented May 29, 2017

Not so much a bug as a missing feature. There is no code to handle timezones separate from the timestamp (<span class="value">19:00+02:00</span> is accepted).

See Parser.php lines 709–715 for the supported value parts.

@aaronpk
Copy link
Member

aaronpk commented Jan 12, 2018

This was fixed in #131

@aaronpk aaronpk closed this as completed Jan 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants