Set milliseconds to zero too #4

Merged
merged 1 commit into from May 28, 2013

Projects

None yet

2 participants

@aragaer
aragaer commented May 25, 2013

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.

@mikereedell mikereedell merged commit 3386d71 into mikereedell:master May 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment