Sunrise and Sunset Times are not possible times

Bug #791650 reported by James Smith
36
This bug affects 8 people
Affects Status Importance Assigned to Milestone
my-weather-indicator
Fix Released
High
Lorenzo Carbonell

Bug Description

In the drop-down menu and in the forecast dialog the reported sunrise and sunset times are often not real times like "44:51". This is very confusing and I do not know what has caused this problem. See the image attached.

Revision history for this message
James Smith (metal-lunchbox) wrote :
Changed in my-weather-indicator:
importance: Undecided → High
assignee: nobody → atareao (lorenzo-carbonell)
Changed in my-weather-indicator:
milestone: none → 0.4.1.0
Revision history for this message
James Smith (metal-lunchbox) wrote :

error is not consistent, though frequent. The times are now correct.

Revision history for this message
Lorenzo Carbonell (lorenzo-carbonell) wrote :

Do It happen in the morning?

Revision history for this message
James Smith (metal-lunchbox) wrote :

doesn't seem to happen in the morning but I can't be certain without more observation, but it's afternoon and the times are still correct.

Revision history for this message
James Smith (metal-lunchbox) wrote :

I think much of the problem is in sun.py dec_to_str function. You should use the built-ins for string generation so that they will be locale specific. time.strftime('%X') will do it, you just have to feed it the time you want. We've already imported time so it costs basically nothing and adds a lot of formating features

Revision history for this message
flakeygeek2000 (alan-tull) wrote :

I see the bug right now (nighttime local time in Austin, TX).

What I see is that the displayed time has 24 hours added.

So sunrise should be 6:29 AM but is shown as 30:29
and Sunset should be 20:28 (8:28 PM) but is shown as 44:28

So the minutes are correct, just the hour may have 24 added.

Also, it would be nice if the time could be shown as AM/PM instead of 24 hour time. But altogether, I like the weather indicator. Good work!

Alan

Revision history for this message
James Smith (metal-lunchbox) wrote :

Not everyone will want am/pm. If it can't be done automatically based on locale, then it should be set in preferences, allowing the user to select a preffered time format based on an example. As far as I know there would only be two formats, 20:28 and 8:28 PM

Revision history for this message
David Grant (bosn181) wrote :

I also get the Sunrise-Sunset times with 24 hours added to their actual times, screenshot attached.

Changed in my-weather-indicator:
status: New → In Progress
Changed in my-weather-indicator:
status: In Progress → Triaged
status: Triaged → Fix Committed
Changed in my-weather-indicator:
status: Fix Committed → Fix Released
Revision history for this message
Keith Bates (ym8z7-keith-nbvkf) wrote :

This problem is still present in 0.6.0.2.quantal.1 installed today.

At midday in Eastern Australia time zone it is showing a moon icon. Additionally sunrise is showing 28:57 and sunset as 19:03. Apart from the incorrect 28:57, the sunset time is not corrected for summer time. Correct time of sunset would be 20:03

Revision history for this message
Keith Bates (ym8z7-keith-nbvkf) wrote :

Now fixed in 0.6.0.4.quantal.1. Thank you for the speedy response!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.