Plugin Author
anmari
(@anmari)
HI mcarans,
ALWAYS check what the ics file is actually saying.
In this case it is using
DTSTART;TZID=Romance Standard Time:20140810T113000.
This (Romance Standard Time) appears to be a microsoft ‘invention’
http://www.quora.com/Where-did-Romance-Standard-Time-come-from-and-why-Romance
http://www.reddit.com/r/RedditDayOf/comments/18ib1d/romance_standard_time_for_central_european_time/
PHP uses the more commonly accepted Olsen Timezone DB. (IANA, PHP etc. Wikipedia cals it “the Tz database” http://en.wikipedia.org/wiki/Tz_database
This post suggests changing your office timezone to something that other calendar applications will accept.
http://www.jevents.net/forum/viewtopic.php?f=31&t=19187
While I can write a mapping function for this plugin, it won’t help for non microsoft people wanting to subscribe to that calendar (which is why I haven’t done it – better to have commonly accepted timezone id. Also a single windows tz maps to more than one ohlson tz) (Ref: http://stackoverflow.com/questions/17348807/how-to-translate-between-windows-and-iana-time-zones)
Using windows tz’s you get errors like this:
http://owncloud.10557.n7.nabble.com/Error-message-while-importing-ical-file-tt11809.html#a11810
The ics spec doesnt insist on the olson db, just suggests it, so i guess MS decides to do their own thing
http://tools.ietf.org/html/rfc5545#page-64
So basically what I am saying is that imho the SAFEST most consistent solution is to see if Microsoft has a way to allow you to specify a a timezone id that is a recognised timezone id
eg: UTC+01:00
or Europe/Copenhagen
ms zones:
http://msdn.microsoft.com/en-us/library/ms912391%28v=winembedded.11%29.aspx
php/olson zones:
http://php.net/manual/en/timezones.europe.php
Plugin Author
anmari
(@anmari)
oh and by the way, only ever use the offset method (ie the UTC=-+ hours) if there is NO daylight saving (DST) in the city/area you are referring.
Better to use Europe/Copenhagen if copenhagen has daylight saving
http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
otherwise it will be ‘wrong’ half the year.
Thanks Anmari for the detailed response. Unfortunately, calendar.live.com only seems to offer the 6 different UTC+1 options.
Is there anywhere I can manually input an offset in the plugin?
Thanks,
Mike
Plugin Author
anmari
(@anmari)
I’m thinking the plugin has to try map the ms timezones anyway (can’t just ignore microsoft even if they don’t have the best implementation.) However that mapping will be a while.
It should also be ‘telling’ the implentor what it’s done (a comment or error message or something to admin – possibly it does this in debug mode…..)
In the interim the plugin defaults to UTC(Europe/London) and the times are 1 hour out because it then adds the hour for copenhagen. You could force it to display as though it were UTC by adding a shortcode parameter tz=UTC.
However if/when the mapping gets added, you will have to take the tz parameter out else the times will be wrong the other way,
Or use a different plugin for now.
Hi Anmari,
tz=UTC pushed the time back by 2 hours maybe because of DST.
I have changed WordPress’s timezone to London from Copenhagen and that seems to give the correct times in the calendar, which works while we don’t have other content that depends on the WordPress time. Do you think this will cause any problems (I’m not a WordPress expert)?
An easy but not perfect kludge in the plugin would be to allow the manual input of an offset eg. offsettz=n where n is an integer, but clearly it would be good to have the MS mapping (although I realise it’s a pain for you as a plugin author to have to support all these different formats).
Thanks,
Mike
Hi Anmari,
Some info that might help:
Mapping from Windows timezone IDs to the standard TZIDs
or in xml format:
XML mapping
Having searched a bit more, a good way to implement it in PHP seems to be to read the above xml file so that the mappings stay up to date eg.
PHP mappings generator source
The above generates a PHP mappings file and would need to rerun periodically.
Hope this helps.
Cheers,
Mike
Plugin Author
anmari
(@anmari)
HI Mike,
already done (before I saw your latest)
See https://wordpress.org/plugins/amr-ical-events-list/changelog/
Let me know if you have any problems.
Hi Anmari,
Thanks very much for updating the plugin so fast. It works fine!
Cheers,
Mike