Issue with GPS.DateAndTime

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

Issue with GPS.DateAndTime

Postby edma01 » Mon May 21, 2018 8:52 pm

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: 609
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: Issue with GPS.DateAndTime

Postby mparadis » Tue May 22, 2018 9:13 am

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?


Return to “VB .NET”

Who is online

Users browsing this forum: No registered users and 1 guest