worldclockwidget
worldclockwidget copied to clipboard
Replace Joda-Time by Time4A
This first step is a library switch from Joda-Time-Android to Time4A. It enables the project to exploit the astronomical features of Time4A in order to solve the issue #46 (calculating sunrise/sunset).
Two minor optimizations had also been done:
- A project-wide unique clock instance had been introduced (
PlatformClock
) which also takes into account possible adjustments of mobile device clocks (done by app users as compensation for bad timezone data on old Android versions). The new clock logically replaces the Joda-methodDateTimeUtils.currentTimeMillis()
- Some method signatures in the class
TimeZoneInfo
had been enhanced by an extra moment-parameter in order to avoid multiple calls of current clock time inside the same method call.
Examples for calculating sunrise or sunset can be found in the documentation of class SolarTime.
will check and do act accordingly.
Does this need changes in the proguard config to build properly?
Sorry for late update of this pull request but the latest commits have now solved the travis build error as predicted in my previous commit. Based on this change, sunrise/sunset-calculations are easy to be added to your app. In case of any questions about usage, just ask a question i.e. open an issue on the issue tracker of Time4J.