General

Location API gives incorrect GPS time when DST is On in LG VS835 Stylo 2
Click123
[/b]Hello team,

We found that device model : " LGE-VS835" ([b]LG VS835 Stylo 2
Verizon Wireless 4G LTE) location API gives incorrect time when device is in PST time zone and Day Light Saving is on.
We are facing time difference of 1 hour between device date time and GPS location API date time.
We are using GPS location manager to get GPS data which uses device GPS chip.
Code API used : location.getTime() (android.location package)

We have identified this, and the issue persist only with this model across all LG models.
For eg :
2018- 09-26 03 14 PM ( device date time)
2018-09- 26 02 14 PM ( at same time, GPS point shows datetime with 1 hr difference )

Let us know if this can be fix with enabling any of the device settings manually.
Posted on 28-Sep-2018
James.

Re:Location API gives incorrect GPS time when DST is On in LG VS835 Stylo 2

Hello.

Please refer to the 'android.location' package's overview that the guide strongly discourages using the 'android.location' API.
See: https://developer.android.com/reference/android/location/package-summary
This site advises to use Google Location Services API, instead.

Also note that the 'android.location.location.getTime()' API does not return the current time; it "returns the UTC time of this fix, in milliseconds since January 1, 1970". The time of fix means the time at which the LocationManager determined the location.
This API is used to measure the delta time, which means to calculate the age of a fix compared to the system clock's.
Even this API's description discourages using this API since it would jump forwards or backwards unpredictably.

We hope that the above answers your questions satisfactorily.

Best Regards,
LG Developer Site team


Posted on 2-Oct-2018
Click123

Re:Location API gives incorrect GPS time when DST is On in LG VS835 Stylo 2

Hi James,
Thanks for your response.

We are using same piece of code for different LG models as well as other OEMs, and it works fine for all except this model.
Is there any settings differently implemented, that need to be change ?

Regards,
Akash


Posted on 9-Oct-2018
Navigation