Feras wrote: > I'm trying to get the Julian Date for the 'current time'/timezone in > the Android device. > I'm running the code below, using the built in getJulianDay function, > but it appears the Julian date being calculated (var JD) is not > correct. > > I'm getting values ~2440255 when I should be getting a value closer to > 2455082 > > TimeZone tz = TimeZone.getDefault(); > int JD = Time.getJulianDay((new Time()).toMillis(false), > tz.getRawOffset()); > > Any help is appreciated
I'd start by confirming that you're getting the right time in the first place, before the Julian conversion. If you are, and it is just the Julian conversion at issue, you might want to check over on Apache Harmony's lists and see if there are any outstanding issues. Time.getJulianDay() probably was not modified in Android and is just the Harmony implementation. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coders' Guide to *Advanced* Android Development_ In Print! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

