- fix sunrise/sunset call, correcting the time zone

git-svn-id: https://osmand.googlecode.com/svn/trunk@858 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
pavol.zibrita 2010-12-26 19:31:59 +00:00
parent e1dd4edc79
commit 2a6d92d031

View file

@ -95,7 +95,7 @@ public class DayNightHelper implements SensorEventListener {
SunriseSunset daynightSwitch = new SunriseSunset( SunriseSunset daynightSwitch = new SunriseSunset(
lastKnownLocation.getLatitude(), lastKnownLocation.getLatitude(),
lastKnownLocation.getLongitude(), new Date(), TimeZone lastKnownLocation.getLongitude(), new Date(), TimeZone
.getDefault().getRawOffset()); .getDefault().getRawOffset()/3600000);
day = daynightSwitch.isDaytime(); day = daynightSwitch.isDaytime();
log.debug("Sunrise/sunset setting to day: " + day); log.debug("Sunrise/sunset setting to day: " + day);
} catch (IllegalArgumentException e) { } catch (IllegalArgumentException e) {