Android Location getTime () adds 1 day error

I am currently using the Samsung Galaxy Tab P1000 and I am stuck in a problem that I do not know for sure if this happens on all smartphones. When syncing GPS every time I get location.getTime (); it returns the actual date plus 1 day. Am I doing something wrong or is this a mistake?

Here is the code:

@Override
    public void onLocationChanged(Location location) {
        setRealTime(location.getTime()); 
        ...
        data = new Date();
        data.setTime(getRealTime());
    }

And now, for example, today it’s 15:31 01/16, it shows 15:31 01/17

The problem is solely in the Samsung Galaxy Tab P1000 ...

any ideas?

+5
source share
1 answer

This is a leap year error in Samsung firmware, confirmed by Samsung. Watch Android: Samsung Galaxy Tabs and Android 2.2 devices showing GPS date for 1 day from January 1, 2012

, ; - NmeaListener LocationListener. 29 ...

+4

All Articles