How do I display Pacific Standard Time/Date with SAM-M8Q?

How do I get Pacific Standard Time (USA) from ubxDataStruct?

Thanks

Hi @LaFoot,

The library gets time from the UBX-NAV-PVT (Position, Velocity, Time) message and that works in UTC (Universal Time Coordinate). You will need to manually adjust for your time zone (and daylight saving).

There is probably code out there which will adjust the time for you, based on your latitude and longitude.

Best wishes,

Paul

All the processing power in that chip and I’m relegated to manual labor.

Makes no sense. It’s a GPS and therefore knows where it is relative to UTC and should produce local time by default. Seems like a no brainer for the people with lots of brains.

With my old GPS I updated Adafriut RTC and did unixtime -8(3600).

I thought I left that malarkey behind. I can always do it the LHW (long hard way) but it should be a function of the chip.

When I turn it on it should show the same time as my cable box. So I get home in time for my favorite show you know.

And if I want some crazy time like UTC I should have to ask for it, not the other way around.

IMHO

Thanks .

UTC is master time, it’s what all other time is derived from. Nothing crazy about that.

How is the GPS supposed to know what local time is where you happen to be located? Time zones are complex and frequently shift, how is the GPS supposed to know about those changes? Don’t forget daylight savings time, how is your GPS supposed to know the rules for your particular location? How is it supposed to know when they change?

Very smart people developed GPS, they knew what they were doing. It’s much better to manually add or subtract from UTC to match your local than it is for the GPS to somehow know what time you want to display. It really only takes a line or two of code, not what I’d consider “LHW.”

There’s some interesting background information on time zone polygons in these links:

https://www.worldtimezone.com/

https://arduino.stackexchange.com/quest … or-arduino

https://stackoverflow.com/questions/160 … 4#16086964

I especially like this one:

https://github.com/foursquare/shapefile-geo