ical4j icon indicating copy to clipboard operation
ical4j copied to clipboard

UTC vs Etc/UTC - CalendarBuilder Exception (java.time.DateTimeException: Unknown timezone identifier [UTC])

Open KaiSuchomel opened this issue 1 year ago • 4 comments

Describe the bug When using a Calendar with Timezone UTC and convert to String and back a Exception occurs. java.time.DateTimeException: Unknown timezone identifier [UTC] Hint: see TimeZoneRegistryImpl.getZoneId() The contained zoneIds (Field) does not contain a Value for UTC.

To Reproduce https://github.com/KaiSuchomel/ical4j/commit/b812997403950c47f3f8f408feaf4a73227697af I have created a Test(UTCCalendarEqualsTest) with UTC and Etc/UTC Calendars. The UTC Test is failing with the Exception.

Expected behavior UTC Test should be handled like Etc/UTC

Environment (please complete the following information):

  • OS: MacOs
  • Java Version 21
  • iCal4j 4.0.0-rc6-pre

KaiSuchomel avatar Apr 19 '24 06:04 KaiSuchomel

@ChMThiel FYI

KaiSuchomel avatar Apr 19 '24 06:04 KaiSuchomel

UTC is defined as an alias of Etc/UTC, but I think there was an issue with how the aliases are resolved. Have committed a fix now. It's included in release rc6.

benfortuna avatar Apr 27 '24 01:04 benfortuna

@benfortuna My Test is still failing. See Commit (https://github.com/KaiSuchomel/ical4j/commit/1220dae2c236fe5d799db9fc66377759fbe2ef24) for the Testcase.

KaiSuchomel avatar Apr 29 '24 08:04 KaiSuchomel

Please Reopen this Issue. Thx

KaiSuchomel avatar Apr 29 '24 09:04 KaiSuchomel