Python Forum
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GPS & UTC time conversion?
#4
(Jun-01-2017, 10:27 AM)Larz60+ Wrote: you need to import datetime
import datetime
import time
gps = 1180344041
print(time.strftime("%b %d %Y %H:%M:%S", time.gmtime(gps)))
strftime reference here: http://strftime.org/

Thank you for your answer, but this can not solve my question.
In your Python code, the result is : May 28 2007 09:20:41
This result may be for UTC time (started from January 1, 1970), not GPS time (started from January 6, 1980)
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,567 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