Skip to content

Better handling of non-(en-)Windows, non-IANA timezone names #164

@rfc2822

Description

@rfc2822

Currently, timezones in DTSTART/DTEND which are not

  • in the ical4j timezone database (based on IANA timezones, but packaged with ical4j, so in the meanwhile outdated – see Packaged ical4j contains outdated timezones #113),
  • an ical4j-known Windows timezone (in msTimezones, see DatePropertyRule)

are converted into UTC (see #163 for a test).

That means that dates and time values can be shifted, which causes problems especially with recurring events, because if the original event is for instance on "Friday 23:00 Special_Timezone (and repeating every Friday)", it can become "Saturday 01:00 UTC (and repeating every Friday)", which breaks the recurrence.

Suggested solution

TZID replacement should be done more carefully:

  1. If a TZID is a known (English) Windows TZID, replace it by IANA TZID.
  2. If a TZID is a known localized Windows TZID, replace it by IANA TZID.
  3. If a TZID is another unknown TZID, try to replace it (in this order):
    1. by the first known timezone with the same (current? at DTSTART?) DAYLIGHT and STANDARD offset,
    2. or by the system default timezone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions