GPS event.time using OS time not satellite seconds

In my app I am using the GPS to collect the time independent from the time the device is set to. During my testing I changed the device’s time manually ahead by 3 hours and 15 minutes - the GPS time reports the exact same time as the device. Therefore I assume the GPS event.time is taking the device’s time and not passing the actual GPS timestamp through to the application.

As my application collect timestamps (for payroll purposes) this is a PRIORITY 1 defect.

Please Ansca management, please fix this defect.

Lee [import]uid: 7855 topic_id: 3704 reply_id: 303704[/import]

I think you will find that the time returned by the GPS is actually UTC (ie the GPS’s timestamp) - you can check this by using a site such as:

www.epochconverter.com

I use the following to extract the UTC from the returned event.time:

[lua]local t = os.date("!*t", math.floor(event.time))[/lua]

You can then use the os.date() commands to format the time.

It does not appear to work properly on Android devices, but hopefully someone will have an idea as to why??

HTH [import]uid: 74250 topic_id: 3704 reply_id: 60019[/import]

If you have some code not working as intended you can file a bug report with steps to reproduce, then we can address it :slight_smile: [import]uid: 52491 topic_id: 3704 reply_id: 61626[/import]