! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Day and night icons are incorrect for my location
Status:
RESOLVED: FIXED
Product:
Xfce4-weather-plugin
Component:
General

Comments

Description Jay 2019-10-25 13:20:36 CEST
Created attachment 9150 
/home/jay/.config/xfce4/panel/weather-1.rc

I live in the Philippines (UTC +8:00.) In Xfce 4.14 the weather update panel app displays nighttime icons until 1:30PM and daytime icons after it gets dark locally.. Confirmed in fresh installations of MX Linux version 19 and Xubuntu version 19.10. Didn't happen in MX Linux version 18 (Xfce 4.12.) I have verified that my OS time and date are correct as well as the time and date setting in my BIOS. (I haven't stayed up late to see when they change to nighttime icons.)
Comment 1 Mikhail Efremov 2019-11-22 17:38:47 CET
Created attachment 9271 
Fix day/night calculation

Function is_night_time() is broken since commit 701da805ecf273f376dbae5003607746fad9d316: astro->sunrise and astro->sunset are in the local time really, so comparison  with currnet time in UTC is always incorrect.
Attached patch fixes the issue.
Comment 2 Mikhail Efremov 2019-11-27 18:06:11 CET
Created attachment 9278 
Fix day/night calculation v2

Fixed patch: values read from cache were wrong.
Comment 3 Jay 2019-12-28 11:24:27 CET
Sorry for the delay but I was finally able to compile and test the patched version and it works. Thank you.
Comment 4 Jay 2019-12-29 09:31:16 CET
I forgot to say, the patched version using the patch from comment 2. Also that everything else about the patched weather update plugin seems to be working too. For example I'm still able to search for my nearest weather station, add and remove items from the scrollbox, and so on. The patch seems to have corrected the incorrect icons issue without causing any other regressions that I can see. :)
Comment 5 Git Bot editbugs 2020-03-01 05:39:17 CET
Mikhail Efremov referenced this bugreport in commit f98836ef80afd511b9debc5d24cc570cd0f6ad20

Fix day/night calculation (bug #16091)

https://git.xfce.org/panel-plugins/xfce4-weather-plugin/commit?id=f98836ef80afd511b9debc5d24cc570cd0f6ad20
Comment 6 Sean Davis editbugs 2020-03-01 05:39:50 CET
Thanks for the patch! Applied above.
Comment 7 Sean Davis editbugs 2020-03-01 05:40:49 CET
*** Bug 15308 has been marked as a duplicate of this bug. ***
Comment 8 Jay 2020-03-17 02:59:38 CET
Has the patched version been released already? I'd like to tell my distro's packaging team where to get it so they can push it out as an update. Thanks.
Comment 9 Jay 2020-03-17 03:23:34 CET
Belay my comment above. I didn't read carefully enough. I see that it's in git. 

Any idea what the version number of the plugin that include the patch would be? I see that Sid has 0.10.1-1. Is that the patched version? Thanks, everyone.
Comment 10 Goran 2020-03-18 16:34:08 CET
(In reply to Jay from comment #9)
> Belay my comment above. I didn't read carefully enough. I see that it's in
> git. 
> 
> Any idea what the version number of the plugin that include the patch would
> be? I see that Sid has 0.10.1-1. Is that the patched version? Thanks,
> everyone.

As far as I can tell from the log of version 0.10.1-1, this patch is not yet in Sid, it will probably show up when there's another release (0.10.2, 0.11.0, or similar) of the weather plugin.

Bug #16091

Reported by:
Jay
Reported on: 2019-10-25
Last modified on: 2020-03-18
Duplicates (1):
  • 15308 Panel weather icons do not correspond to the correct timezone

People

Assignee:
Harald Judt
CC List:
6 users

Version

Version:
0.10.0

Attachments

/home/jay/.config/xfce4/panel/weather-1.rc (591 bytes, application/vnd.kde.kxmlguirc)
2019-10-25 13:20 CEST , Jay
no flags
Fix day/night calculation (7.74 KB, patch)
2019-11-22 17:38 CET , Mikhail Efremov
no flags
Fix day/night calculation v2 (9.08 KB, patch)
2019-11-27 18:06 CET , Mikhail Efremov
no flags

Additional information