After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 757186 - Missing some items in the forecasts for today/tomorrow
Missing some items in the forecasts for today/tomorrow
Status: RESOLVED FIXED
Product: gnome-weather
Classification: Applications
Component: general
3.13.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Weather Maintainer(s)
GNOME Weather Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-10-27 13:15 UTC by vgb
Modified: 2016-02-29 19:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description vgb 2015-10-27 13:15:39 UTC
There used to be an item for 2am in the forecast for tomorrow but now it's missing. There is also missing one item in the forecast for today. If it's 7am the forecast should start with item for 8am but it starts with item for 11am. The issue is because of ForecastBox._preprocess method in 'src/app/forecast.js'. When the first info for appropriate day is found in the first loop it is ignored. It should be pushed:
	if (Util.arrayEqual(now.get_ymd(), datetime.get_ymd())) {
+		ret.push(info);
		current = datetime;
		break;
	}
}

-for ( ; i < infos.length; i++) {
+for (i++; i < infos.length; i++) {
or:
-let current;
+let current = GLib.DateTime.new_local(2015, 10, 1, 0, 0, 0); //initialize it with date < today
...
	if (Util.arrayEqual(now.get_ymd(), datetime.get_ymd())) {
-		current = datetime;
		break;
	}
Comment 1 Giovanni Campagna 2016-02-29 19:24:53 UTC
This was fixed in 3.19.90 but apparently I forgot to close the bug.

This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.