ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #05422
[Merge] lp:~vthompson/ubuntu-weather-app/fix-var-name-clash into lp:ubuntu-weather-app/reboot
Victor Thompson has proposed merging lp:~vthompson/ubuntu-weather-app/fix-var-name-clash into lp:ubuntu-weather-app/reboot.
Commit message:
* Fix variable name clash that caused the hourly forecast to use the wrong offset.
Requested reviews:
Ubuntu Weather Developers (ubuntu-weather-dev)
For more details, see:
https://code.launchpad.net/~vthompson/ubuntu-weather-app/fix-var-name-clash/+merge/275118
* Fix variable name clash that caused the hourly forecast to use the wrong offset.
The previous MP caused a regression in the hourly forecast times, such that they were offset by the current location's timezone offset.
--
Your team Ubuntu Weather Developers is requested to review the proposed merge of lp:~vthompson/ubuntu-weather-app/fix-var-name-clash into lp:ubuntu-weather-app/reboot.
=== modified file 'app/data/WeatherApi.js'
--- app/data/WeatherApi.js 2015-10-20 01:37:34 +0000
+++ app/data/WeatherApi.js 2015-10-21 02:20:20 +0000
@@ -553,9 +553,9 @@
}
tmpResult[day] = _buildDayFormat(date, dayData, nowMs);
var timezoneOffset = new Date().getTimezoneOffset();
- var offset = (location.timezone && location.timezone.dstOffset !== undefined) ? (location.timezone.dstOffset*60 + timezoneOffset)*60*1000: 0
- var sunrise = new Date(sunRiseSet.rise*1000 + offset);
- var sunset = new Date(sunRiseSet.set*1000 + offset);
+ var timesOffset = (location.timezone && location.timezone.dstOffset !== undefined) ? (location.timezone.dstOffset*60 + timezoneOffset)*60*1000: 0
+ var sunrise = new Date(sunRiseSet.rise*1000 + timesOffset);
+ var sunset = new Date(sunRiseSet.set*1000 + timesOffset);
var options = { timeZone: location.timezone.timeZoneId, timeZoneName: 'long' };
tmpResult[day].sunrise = sunrise.toLocaleTimeString(Qt.locale().name, options);
tmpResult[day].sunset = sunset.toLocaleTimeString(Qt.locale().name, options);
=== modified file 'debian/changelog'
--- debian/changelog 2015-10-18 22:57:34 +0000
+++ debian/changelog 2015-10-21 02:20:20 +0000
@@ -31,6 +31,7 @@
* Show the bottom loading animation (LoadingIndicator) on the LocationsPage. (LP: #1490040)
* Add FakeHeader component to ease the bottom edge transition.
* Use the timezone of the Location to display sunrise/sunset times.
+ * Fix variable name clash that caused unintented consequences.
[ Andrew Hayzen ]
* Add mocked locations for autopilot and add a test using the data
Follow ups