I am unable to create net.fortuna.ical4j.model.TimeZone object. Following is my code:
TimeZoneRegistry registry = TimeZoneRegistryFactory.getInstance().createRegistry();
TimeZone timezone = registry.getTimeZone("GMT+5:30");
If I use timezone ID from Olson database, then it works. But I want to create timezone object using non Olson database id like "GMT+5:30". Can this be possible?
Amy help would be appreciated.
Unfortunately you can only retrieve predefined timezones from the registry. If you wanted to create a custom timezone you would need to construct a VTimeZone component and define the nested Observance components manually. I would recommend just using a predefined timezone if possible though.
Thanks for your input.
I could not find any sample to construct a VTimeZone component and define the nested Observance components. If you have any sample code, can you please share?
Log in to post a comment.