Python Forum
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GPS & UTC time conversion?
#3
The "UTC time stamp" is the number of seconds since the "Epoch" (Jan 1st, 1970, 00:00:00 UTC). All the times you mentioned are UTC. This one is known as "POSIX time" (this is how time is kept on (Unix-based) computers).

The GPS timestamp is the same thing but the reference is different,and seems to be December 31st, 1979, 23:59:42 (technically it is December 1st 1980, 00:00:00 UTC, but the leap seconds are not taken in account the same way). So do go from GPS to POSIX and vice-versa you add/subtract 315964782 seconds.

POSIX time is supported in all computer libratries. In python:

Output:
>>> import datetime >>> datetime.date.fromtimestamp(0) datetime.date(1970, 1, 1) >>> datetime.date.fromtimestamp(1496308823) datetime.date(2017, 6, 1)
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply


Messages In This Thread
GPS & UTC time conversion? - by jackbk - Jun-01-2017, 09:26 AM
RE: GPS & UTC time conversion? - by Larz60+ - Jun-01-2017, 10:27 AM
RE: GPS & UTC time conversion? - by jackbk - Jun-05-2017, 03:05 AM
RE: GPS & UTC time conversion? - by Ofnuts - Jun-01-2017, 11:37 AM
RE: GPS & UTC time conversion? - by jackbk - Jun-05-2017, 04:12 AM
RE: GPS & UTC time conversion? - by Ofnuts - Jun-05-2017, 11:47 AM
RE: GPS & UTC time conversion? - by jackbk - Jun-06-2017, 09:40 AM
RE: GPS & UTC time conversion? - by Ofnuts - Jun-06-2017, 11:50 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Time conversion error tester_V 1 2,064 Oct-28-2020, 10:48 PM
Last Post: tester_V
  pyad time conversion error (plus solution) PapaZod 2 3,565 Nov-25-2018, 02:42 PM
Last Post: PapaZod
  Conversion of Time Duration in seconds in python jdevansh99 0 2,892 Jun-05-2018, 05:12 PM
Last Post: jdevansh99

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020