mikereedell / sunrisesunsetlib-java

Library for computing the sunrise/sunset from GPS coordinates and a date, in Java.
http://mikereedell.github.com/sunrisesunsetlib-java/
Apache License 2.0
299 stars 69 forks source link

Set milliseconds to zero too #4

Closed aragaer closed 11 years ago

aragaer commented 11 years ago

The code explicitly sets seconds to zero but leaves milliseconds. Since the result depends on current time, this may cause changes in milliseconds of calculated time which could leave to strange results (for example calculating time of next sunset immediately after sunset could give a new value which is after current time).

The simple change is to set milliseconds to zero too.