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

iCalendar format: Avoid 'floating' times in export #392

Closed
raboof opened this issue May 5, 2018 · 6 comments
Closed

iCalendar format: Avoid 'floating' times in export #392

raboof opened this issue May 5, 2018 · 6 comments

Comments

@raboof
Copy link

raboof commented May 5, 2018

Setup

  • MediaWiki | 1.30.0 (636a2b9)22:27, 30 April 2018
  • PHP | 7.0.27-0+deb9u1 (apache2handler)
  • MariaDB | 10.1.26-MariaDB-0+deb9u1
  • Semantic MediaWiki | 3.0.0-alpha (497c969) 20:17, 29 April 2018
  • Semantic Result Formats | 3.0.0-alpha (540e63e) 09:28, 19 April 2018

Issue

The iCalendar export now includes a timezone section, but start/end times are still represented as 'floating' times. Those have really weird semantics in iCalendar (https://tools.ietf.org/html/rfc5545#section-3.3.12), so it would be good to avoid that.

https://www.semantic-mediawiki.org/wiki/Help:Type_Date notes SMW times are in the server/wiki timezone. Suppose the server/wiki timezone is GMT+1, an events that starts at "2019-01-12 18:00" is now represented in iCalendar format as DTSTART:20190112T083000.

If we'd wanted to avoid 'floating' times, we have 2 options: we could convert the date to UTC (leading to DTSTART:20190112T073000Z) or add a TZID parameters (leading to DTSTART;TZID=Europe/Paris:20190112T083000).

I just tested and both variations work as expected when importing into Google Calendar (unlike the current 'floating' time).

I'd be happy to contribute this feature. I'm on the fence whether I'd prefer to implement exporting as UTC or exporting with a TZID parameter, it's hard to say which is more likely to be interpreted 'correctly' even by importers that do not implement RFC5545 completely.

Any preference?

@kghbln
Copy link
Member

kghbln commented May 5, 2018

Thanks for reporting this enhancement.

https://sandbox.semantic-mediawiki.org at the time of writing the issue

Exactly. This does not help a lot since the setup may change every day.

If we'd wanted to avoid 'floating' times, we have 2 options

Intuitively I personally would go for converting the date to UTC since this appears to be more robust against "changes" in comparison to TZIDs.

I'd be happy to contribute this feature.

This will be great I presume. :)

@kghbln kghbln changed the title Avoid 'floating' times in iCalendar export iCalendar format: Avoid 'floating' times in export May 5, 2018
@raboof
Copy link
Author

raboof commented May 6, 2018

@kghbln I didn't see an obvious way to get current version information from the running sandbox instance - do you have any pointers?

@kghbln
Copy link
Member

kghbln commented May 6, 2018

@raboof No worries, I already updated the info in the report. For MediaWiki you can find this information on Special:Version.

@mwjames
Copy link
Contributor

mwjames commented May 12, 2018

The iCalendar export now includes a timezone section, but start/end times are still represented as 'floating' times.

Thanks for investigating.

times. Those have really weird semantics in iCalendar (https://tools.ietf.org/html/rfc5545#section-3.3.12), so it would be good to avoid that.
Any preference?

The rfc notes "... most cases, a fixed time is desired. To properly communicate a fixed time in a property value, either UTC time or local time with time zone reference MUST be specified. ..." since either must be present, I'd prefer the use of UTC since we generally refer to UTC as representation value.

we have 2 options: we could convert the date to UTC (leading to DTSTART:20190112T073000Z)

I would guess [0] to be modified and it is most likely that icalendar integration tests do require some adaption.

[0] https://github.com/SemanticMediaWiki/SemanticResultFormats/blob/master/src/iCalendar/IcalTimezoneFormatter.php#L143-L144

@raboof
Copy link
Author

raboof commented Aug 27, 2019

Hmm, not sure it was OK to close this, as AFAICS the ical export still produces 'floating' times for the start/stop times. But my personal problem was solved since, so I won't reopen it myself at this point ;).

@mwjames
Copy link
Contributor

mwjames commented Sep 1, 2019

Hmm, not sure it was OK to close this, as AFAICS the ical export still produces 'floating' times for the start/stop times

Well, I have cite two ways of solving this issue by referencing to the RFC and I decided to implement one specific way (#435) of dealing with the problem. So, in case I have misunderstand the issue, I'd like to be educated otherwise there is nothing left to be done and is the reason why the ticket was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants