Bob, et al, Wow! Great comments and replies. Thanks!
The sunrise/sunset time is given in UTC based on lat/long. As another poster said, I do have that part down pat. My only concern is with how to display the time for the correct timezone. My user has manually set his timezone because of a problem with Google calendar. He never wants the phone to know that it might have changed timezones. The phone still displays the correct time for the local timezone. His request is that since the phone knows the correct time, why is my app not displaying the "correct" time for sunset. I think I will go with one of the other poster's comments. Since the phone is being told its timezone, the app will do what its told. If it becomes important, I can always add a preference to allow a user to override the timezone setting for the app. Thanks for all the help! ...Jake >>>>> "BK" == Bob Kerns <r...@acm.org> writes: BK> While one hopes he does, it's not always a good assumption. But BK> that aspect wasn't the intended focus of my remarks. BK> The point is -- the timezone SHOULD have absolutely ZERO impact BK> on the actual calculated times. BK> There are really only three ways to get an error here that I can BK> see. (Chime in if you can come up with more!) BK> * Using the wrong location. BK> * Doing the wrong calculation. BK> * Displaying with the wrong timezone (including DST errors, but that BK> shouldn't be possible as a program error that I can see). BK> A fourth possibility is a confused user; I'm not sure how to BK> break down the possibilities there -- though using a TZ with BK> different DST characteristics might be included. BK> But I think the first step in sorting out the problem is to BK> identify which problem you have, and that was why I was covering BK> the territory. I hope the OP understands that I don't know any BK> details of his knowledge or app, and can disregard any aspect of BK> my message he's confident he's adequately eliminated! BK> On Sat, Apr 23, 2011 at 8:40 AM, String <sterling.ud...@googlemail.com>wrote: >> No offense, Bob (and I do mean that, I value your posts on this forum), but >> I think we can safely assume that the OP knows how to calculate times of >> sunrise and sunset. He's already showing that in his app, from the sound of >> things, and is probably doing OK with that aspect. >> >> The issue at hand is how (and maybe whether) to work around a user having >> set their phone to a different zone than the one they're actually >> in. Nobody >> says this is affecting the absolute (UTC) time of sunrise/sunset in the >> calculations, it's purely about display. >> >> String >> >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to android-developers@googlegroups.com >> To unsubscribe from this group, send email to >> android-developers+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> BK> -- BK> You received this message because you are subscribed to the Google BK> Groups "Android Developers" group. BK> To post to this group, send email to android-developers@googlegroups.com BK> To unsubscribe from this group, send email to BK> android-developers+unsubscr...@googlegroups.com BK> For more options, visit this group at BK> http://groups.google.com/group/android-developers?hl=en -- Jake Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en