-
Notifications
You must be signed in to change notification settings - Fork 11
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
MS timezone "Central America Standard Time" is transformed with DST #157
Comments
To reproduce: @Test
fun testGuatemala() {
javaClass.classLoader!!.getResourceAsStream("events/guatemala.ics").use { stream ->
val events = Event.eventsFromReader(InputStreamReader(stream, Charsets.UTF_8))
assertEquals(1, events.size)
val event = events[0]
event.dtStart!!.let { start ->
val instant = Instant.ofEpochMilli(start.date.time)
val dateTime = instant.atZone(ZoneId.of("America/Guatemala"))
println(start.timeZone.id)
assertEquals(
ZonedDateTime.of(2024, 7, 3, 10, 0, 0, 0, ZoneId.of("America/Guatemala")),
dateTime
)
}
}
} Fails with:
|
In any case, I think the timezone is directly not correctly defined in the ics. It doesn't specify any daylight saving, and "Central America Standard Time" is ambiguous I think, so that may be the issue here. |
I agree:
I also found a table on unicode.org that suggests these mappings:
I think So as I understand it, this would have to be updated in ical4j in the MS outlook mapping file. @ArnyminerZ Can you please prepare an issue/PR for ical4j and link it as dependency? |
Okay, I'll open a PR for that, however, I don't know if it will be released on 3.* knowing that 4.* is already stable... |
This PR/issue depends on: |
ICS files with the timezone "Central America Standard Time", which should be the one used in Guatemala. It looks like it gets converted to Chicago, which may break summer time I think.
The problem seems to come from files generated from Outlook.
Example ICS file: internal
Depends on ical4j/ical4j#709
The text was updated successfully, but these errors were encountered: