Issue with GPS.DateAndTime

Supporting Visual Studio on Windows
Post Reply
edma01
Fresh meat
Posts: 1
Joined: Mon May 21, 2018 8:35 pm
Contact:

Issue with GPS.DateAndTime

Post by edma01 »

Hi, I'm using a 1040_0 GPS device and Phidget22.NET.dll.
Just updated the code from Phidget21, and now the GPS.DateAndTime function fails. Everything else works 100% perfect, device is initialised and fixed and returning our correct location on the map, but even a call as simple as:

Code: Select all

Dim someVar As DateTime = myOpenedGPSObject.DateAndTime()
will throw an exception with the message stating that the date-time is not in the correct format or similar (will update with exact exception message if needed).

This worked fine in Phidget21 and the p21 and p22 GPS.GPSDateAndTime and GPS.DateAndTime (respectively) are functionally identical at the wrapper level, this must be lower level I assume?


For further reference the date and time string is being displayed in the Phidget22 manager fine, so this confirms the device is working.
User avatar
mparadis
Site Admin
Posts: 959
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: Issue with GPS.DateAndTime

Post by mparadis »

In our VB GPS sample code it looks like we do

Code: Select all

Dim localTime As DateTime = device.DateAndTime.ToLocalTime()
Does using .ToLocalTime() fix your exception?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests