[GIS] How to get an accurate time attribute when importing a GPX layer as a vector

gpxqgistime

When I import a GPX file in QGIS (as a vector as track points) and I check the time attribute it appears to be 4 hours later than it should be. Interestingly when I take this same GPX file and use GPSBabel to convert it to a CSV file I find that the time listed in the CSV is the correct time.

So am I doing something wrong or is this a bug in QGIS.

Thanks for the help.

David

Best Answer

You can open the GPX file in a text editor.

Testing with my device, QGIS uses the same UTC format as written in the GPX file.

http://www.topografix.com/gpx_manual.asp#time

Date and time are in Univeral Coordinated Time (UTC), not local time!

The universal CSV driver of GPSbabel is able to add the local UTC offset to the data. But this value is not from the GPS unit:

http://www.gpsbabel.org/htmldoc-development/fmt_unicsv.html

Playing around with GPSBabel and the timezone declared in my Windows system settings, GPSbabel must take this offset value from the OS, unless stated in the utc option explicitely. Daylight saving time is respected, looking at the date given with the time stamp, and not the current date.

Rather strange, and undocumented...