ical4j / ical4j-zoneinfo-outlook

MS Outlook-compatible Timezone Definitions
http://www.ical4j.org/zoneinfo-outlook/
Other
4 stars 2 forks source link

DST not wokring with newYork timezone #15

Closed gkondayap closed 6 years ago

gkondayap commented 6 years ago

ISSUE: dst is not working with newYork time zone. DailyEvent created in newyork timezone at 05-05-2018- 11:30. However event start time calculated as 05-05-2018- 10:30. DST +1 hour is not applied.

CODE-USED: TimeZoneRegistry timeZoneRegistry = new TimeZoneRegistryImpl( "/tzurl.org/zoneinfo-outlook/" ); Code version: Ical4j-3.0.1 version

SOLUTION: Dst is working with below code. TimeZoneRegistry timeZoneRegistry = new TimeZoneRegistryImpl();

QUESTIONS: (1) Does latest ical4j-3.0.1 has any incompatibility with parameter (( "/tzurl.org/zoneinfo-outlook/" );) ? (2) Do you prefer to go with default constructor instead of usiing ( "/tzurl.org/zoneinfo-outlook/" ) ?

benfortuna commented 6 years ago

It looks like you have the wrong prefix defined in your code. It is recommended to use the OutlookTimeZoneRegistryFactory defined in the ical4j-zoneinfo-outlook dependency, eg.

TimeZoneRegistry timeZoneRegistry = OutlookTimeZoneRegistryFactory.getInstance().createRegistry();

This is basically the same as:

TimeZoneRegistry timeZoneRegistry = new TimeZoneRegistryImpl( "zoneinfo-outlook/" );
gkondayap commented 6 years ago

Thank you for the response. I used ical4j-3.0.1 alone. Now i included ical4j-zoneinfo-outlook to utilize OutlookTimeZoneRegistryFactory.

I see Four more available apis. ical4j-connector / ical4j-extensions/ / ical4j-integration/ ical4j-vcard/-> . Are they mandatory or required to continue with ical4j ?

benfortuna commented 6 years ago

No they are all optional. Roughly summarised as follows:

gkondayap commented 6 years ago

Thank you for short note.