Skip to content

Commit

Permalink
Allow for null observances
Browse files Browse the repository at this point in the history
  • Loading branch information
benfortuna committed Jul 8, 2019
1 parent b1cf42a commit 9ae3efc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/net/fortuna/ical4j/model/TimeZone.java
Expand Up @@ -33,6 +33,7 @@

import net.fortuna.ical4j.model.component.Daylight;
import net.fortuna.ical4j.model.component.Observance;
import net.fortuna.ical4j.model.component.Standard;
import net.fortuna.ical4j.model.component.VTimeZone;
import net.fortuna.ical4j.model.property.TzId;
import net.fortuna.ical4j.model.property.TzOffsetFrom;
Expand Down Expand Up @@ -195,7 +196,7 @@ private static int getRawOffset(VTimeZone vt) {
if (offsetFrom != null) {
return (int) (offsetFrom.getOffset().getTotalSeconds() * 1000L);
}
} else {
} else if (latestSeasonalTime instanceof Standard) {
final TzOffsetTo offsetTo = latestSeasonalTime.getProperty(Property.TZOFFSETTO);
if (offsetTo != null) {
return (int) (offsetTo.getOffset().getTotalSeconds() * 1000L);
Expand Down

0 comments on commit 9ae3efc

Please sign in to comment.