TimeZone.getOffset(final int era, final int year, final int month, final int day, final int dayOfWeek, final int milliseconds) returns wrong values because it mistakenly sets
DAY_OF_YEAR instead of
day and doesn't take into account that
MONTH values begin with 0.
This leads to obscure bugs like https://github.com/rfc2822/davdroid/issues/186 – the DateParser of my OpenJDK 1.7.0 seems to call
getOffset(long) when a timezone is passed, while Android's Java seems to call
getOffset(era,y,m,d,dow,ms). This is why only Android is effected in the referenced issue.
The other thing is that this bug is dependent on the local clock time of the device running ical4j because
DAY_OF_YEAR is set instead of
DAY_OF_MONTH is set to the current time, leading to test results depending on the local date.