Closed bhaskar-c closed 9 years ago
Is this bug still present?
Just check the above mentioned fix...
No, SolarEventCalculator.java still contains "return offSet.setScale(0, RoundingMode.HALF_EVEN);" instead the fix. Just do the fix in your fork.
Issue has been fixed in most recent commit.
Also, thank you Mike for this library. People like you is why we are able to develop awesome apps :)
The sunsrise/sunet calculator works good but there is an error in SolarEventCalculator.java which seems to be rounding the TimeZone offset.
If I pass "Asia/Kolkata" as the Timezone, which has an offset of UTC + 5.30, this code returns the offset as 5, which in turn causes a major difference in the time output by the program. I tested this by adding a Log to the offset value.
I corrected the error by changing the offSetInMillis in code from int to double and simply returning offSet.setScale(2);