Skip to main content

Find the next leap second using IERS-OP web service.

Project description

It answers the following questions:

  • What is the current difference between TAI and UTC?

  • When was the last leap second?

  • When is the next leap second?


As a library:

>>> from leap_second_client import request_leap_second_info
>>> request_leap_second_info()
     , 6, 30),

Or as a command-line client (greppable json output):

$ python -m leap_second_client
    "TAI_UTC": 36,
    "last_leap_second": "2015-06-30",
    "next_leap_second": null

It gives the current value of TAI-UTC in (integer) seconds, the date of the last leap second and the date of the next leap second. If no leap second is scheduled, then the value is None. The webservice relies on the information of the last Bulletin C and the current date.



No dependencies except Python itself and the webservice. To install, just download or run:

$ pip install leap_second_client

Support: Python 2.6+, Python 3.

License: MIT

Project details

Release history Release notifications | RSS feed

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

leap_second_client-1.0.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

leap_second_client-1.0-py2.py3-none-any.whl (5.1 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page