mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-25 18:15:49 +01:00
store UTC in weather timestamp
This commit is contained in:
parent
4c8728c78f
commit
b9eedce13b
@ -23,6 +23,8 @@ import android.content.Intent;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.SimpleTimeZone;
|
||||
|
||||
import nodomain.freeyourgadget.gadgetbridge.GBApplication;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.Weather;
|
||||
import nodomain.freeyourgadget.gadgetbridge.model.WeatherSpec;
|
||||
@ -51,7 +53,7 @@ public class WeatherNotificationReceiver extends BroadcastReceiver {
|
||||
LOG.info("weather in " + weather.location + " is " + weather.currentCondition + " (" + (weather.currentTemp - 273) + "°C)");
|
||||
|
||||
WeatherSpec weatherSpec = new WeatherSpec();
|
||||
weatherSpec.timestamp = (int) (weather.queryTime / 1000);
|
||||
weatherSpec.timestamp = (int) ((weather.queryTime - SimpleTimeZone.getDefault().getOffset(weather.queryTime)) / 1000);
|
||||
weatherSpec.location = weather.location;
|
||||
weatherSpec.currentTemp = weather.currentTemp;
|
||||
weatherSpec.currentCondition = weather.currentCondition;
|
||||
|
Loading…
Reference in New Issue
Block a user