Skip to main content

Backport of the timestamp method from Python 3.3

Project description

https://img.shields.io/pypi/v/backports.datetime_timestamp.svg https://img.shields.io/pypi/pyversions/backports.datetime_timestamp.svg tests Ruff Code style: Black https://img.shields.io/badge/skeleton-2023-informational

Backport of the datetime.timestamp() method added in Python 3.3.

Used as:

from backports.datetime_timestamp import timestamp
import datetime

dt = datetime.datetime.utcnow()
# instead of dt.timestamp(), use
timestamp(dt)

Supported by

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