Get GPS to UTC leap seconds

595 views Asked by At

Is there a simple way to get leap seconds between gps and utc time through an API or python library which is automatically update if the leap seconds change over the years ?

1

There are 1 answers

0
randn On

Currently, the leap seconds between UTC and GPS is 18 seconds. This 18 seconds was applied on 31/12/2016. Nobody knows when the next change is required because the leap seconds are irregular and unpredictable.

But there is one thing: leap seconds are always applied either on December 31st or June 30th.

There is no API I know about to check this. I think you have to check these dates on your own, if new leap seconds are applied.

Edit: I just found this file from Paris Obs. IERS Center. You can read and parse this file in python. The GPS-UTC Leap seconds is the difference between the line "44239.0 1 1 1980 19" (which is the beginning year of GPS Time) and the last line.