Page 1 of 1

Issue with GPS.DateAndTime

Posted: Mon May 21, 2018 8:52 pm
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.

Re: Issue with GPS.DateAndTime

Posted: Tue May 22, 2018 9:13 am
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?