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.)
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.
Created attachment 9278 Fix day/night calculation v2 Fixed patch: values read from cache were wrong.
Sorry for the delay but I was finally able to compile and test the patched version and it works. Thank you.
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. :)
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
Thanks for the patch! Applied above.
*** Bug 15308 has been marked as a duplicate of this bug. ***
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.
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.
(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.