Hi Guys,
This came in handy for me today, so I just wanted to share the tip.
If you are reading UTC time from GPS, and want to display your local time,
there’s no other way but having a complete calendar to know what the date is going to be
if your adjustment of the hours made a day change over.
If you read 22:00 UTC time from the GPS, and in my location, have to add the offset +10,
you would have the time 32:00, and would have watched for 24 hour overflow in an hours buffer,
so the time would be displayed correctly as 08:00. The day could have been incremented on the
overflow of the hours buffer as well, but it could have also been the last day of the month or year,
and you need to know how many days are in the particular month for the current year.
This all didn’t really occur to me until I next read the time from a GPS module,
but the limitation has hit me before.
Cheers, Art.
Bookmarks