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

Microsoft Time Zones are not Mapped Correctly to IANA Time Zones #6

Open
ChrDr opened this issue May 18, 2016 · 9 comments
Open

Microsoft Time Zones are not Mapped Correctly to IANA Time Zones #6

ChrDr opened this issue May 18, 2016 · 9 comments
Labels
Milestone

Comments

@ChrDr
Copy link

ChrDr commented May 18, 2016

Microsoft has its own naming convention for time zones (see https://msdn.microsoft.com/en-us/library/ms912391%28v=winembedded.11%29.aspx) that does not conform to the IANA time zone database (tzdata).

This fills the logs with a lot of messages like:
kontact[775]: Cannot open "/usr/share/zoneinfo/GMT Standard Time"
kontact[775]: Cannot open "/usr/share/zoneinfo/W. Europe Standard Time"
kontact[775]: Cannot open "/usr/share/zoneinfo/Eastern Standard Time"

Besides that, korganizer partly shows the wrong time for the appointments (depending on whether the locally configured timezone conforms to the timezone used for the appointment).

Fixing this would improve the usability of the calendar component of your really great akonadi plugin a lot.

@KrissN
Copy link
Owner

KrissN commented May 18, 2016

I am aware of that. The timezone mapping is a mess and conversion is not trivial. I've spend days on trying to get this right and I'm still seeing issues. Blame Microsoft for creating its own "standards".

I'll look deeper into this when working on full calendar support.

@mozguletz
Copy link

Hi,
First, I would like to thank you for the project, I like it a lot.
Related to the timezone issue, icu project also provides a funtion for converting windows time zones, and icu library is present in most of the Linux distros, not sure if you tried that.

http://icu-project.org/apiref/icu4c/classicu_1_1TimeZone.html#a0872f72c5c3204de3c61502be568d72d

@KrissN
Copy link
Owner

KrissN commented May 18, 2016

This is actually what I'm using (wrapped by Qt) - see calendar/ewsfetchcalendardetailjob.cpp:272

The problem is that it doesn't always work.

@KrissN KrissN added the bug label Aug 5, 2016
@KrissN KrissN added this to the Release 0.8.2 milestone Aug 5, 2016
@kakra
Copy link

kakra commented Oct 30, 2016

I simply symlinked the "missing" timezones to localtime in /usr/share/zoneinfo. That's probably not the correct fix but it speeds up calendar loading by an amazing factor and puts calendar items back into the correct time slot.

@gladhorn
Copy link

Is there a Qt bug for the times when it doesn't work? If not, file one. Please send the bug number to me, I'd love to see this fixed :)

@KrissN
Copy link
Owner

KrissN commented Oct 9, 2017

This should now be fixed thanks to the refactoring done in KCalCore. The time zones are now matched based on offsets, not names, which reduces the chance that the time zone from an event will fail to be converted.

I'm testing this change now and will let you know if it works.

@kakra
Copy link

kakra commented Oct 9, 2017

How will this interact with time zones that use DST?

@KrissN
Copy link
Owner

KrissN commented Oct 9, 2017

That I don't know - I did neither write or review that code (https://cgit.kde.org/kcalcore.git/tree/src/icaltimezones.cpp#n466). Time and tests will tell.

@KrissN
Copy link
Owner

KrissN commented Oct 9, 2017

According to the code and the comment that I received from Daniel Vratil the function does take into account DST offsets.

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

No branches or pull requests

5 participants