Skip to main content

Data for official leap seconds, provided as a tuple of Unix timestamps

Project description

leapseconds

PyPi Version License Continuous Integration Code Coverage Python Versions


leapseconds is a Python library with data on official leap seconds, provided as a tuple of Unix timestamps.

Source data: https://www.ietf.org/timezones/data/leap-seconds.list

Installation

pip install leapseconds

Usage

from leapseconds import LEAP_SECONDS

# Check if a Unix timestamp represents an officially announced leap second:
if 63072000 in LEAP_SECONDS:
    print("True")
  • LEAP_SECONDS:
    • A tuple of Unix timestamps (int) that represent officially announced leap seconds in chronological order.

License

leapseconds is distributed under the terms of the MIT license.

Project details


Download files

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

Source Distribution

leapseconds-2023.4.0.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

leapseconds-2023.4.0-py3-none-any.whl (4.3 kB view hashes)

Uploaded 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