Tools for working with timezone-aware datetimes.
Project description
timezone-tools
Helpers for working with timezone-aware date-times.
This package provides:
TimezoneConverterfor making date-times timezone-aware and converting between timezones.Clockfor getting the current time/date in a specific timezone.
TimezoneConverter
This converter object can be used
to create timezone-aware datetime objects,
to make a naive datetime timezone-aware,
and to localize other timezone-aware datetime objects.
The converter also provides utilities
for converting a datetime into a date in the converter's timezone,
calculating dates and time relative to a datetime,
and rounding a datetime to the nearest increment of time
(e.g. to the nearest half-hour).
Create an instance of the timezone converter by passing it an IANA time zone name.
from timezone_tools import TimezoneConverter
paris_time = TimezoneConverter("Europe/Paris")
For more information about timezone support in Python,
see the documentation for the zoneinfo module.
Clock
This clock object can be used to access the system clock and provides timezone-aware dates and times.
The clock also provides utilities for calculating dates and time relative to the current moment.
Create an instance of the clock by passing it an IANA time zone name.
from timezone_tools import Clock
paris_time = Clock("Europe/Paris")
For more information about timezone support in Python,
see the documentation for the zoneinfo module.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file timezone_tools-0.1.0.post1.tar.gz.
File metadata
- Download URL: timezone_tools-0.1.0.post1.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3545d179ee59f49764810878ea178433519974cc8c112a187e6d9416b289130
|
|
| MD5 |
73068bd5c453488f649dc13c219a1d0e
|
|
| BLAKE2b-256 |
821dcb95e07ac2e5c736736dbba5a4b76f9872b535013205770b8ef3e4f27ce5
|
Provenance
The following attestation bundles were made for timezone_tools-0.1.0.post1.tar.gz:
Publisher:
build_and_publish.yaml on kraken-tech/timezone-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
timezone_tools-0.1.0.post1.tar.gz -
Subject digest:
c3545d179ee59f49764810878ea178433519974cc8c112a187e6d9416b289130 - Sigstore transparency entry: 206186760
- Sigstore integration time:
-
Permalink:
kraken-tech/timezone-tools@d843b366cd860074d76b21bea2b490498ca74d08 -
Branch / Tag:
refs/tags/v0.1.0.post1 - Owner: https://github.com/kraken-tech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_and_publish.yaml@d843b366cd860074d76b21bea2b490498ca74d08 -
Trigger Event:
push
-
Statement type:
File details
Details for the file timezone_tools-0.1.0.post1-py3-none-any.whl.
File metadata
- Download URL: timezone_tools-0.1.0.post1-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
536fcae45029358d7fa5379d527856c0e34afb855de9ea8629326f60f9c5d6aa
|
|
| MD5 |
5895e7e0ed2ee47a6c283f163220f049
|
|
| BLAKE2b-256 |
a21f01f16a533a15c7e4e61984fd8929c038cc61851ca3d3de30c67cdd1462a2
|
Provenance
The following attestation bundles were made for timezone_tools-0.1.0.post1-py3-none-any.whl:
Publisher:
build_and_publish.yaml on kraken-tech/timezone-tools
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
timezone_tools-0.1.0.post1-py3-none-any.whl -
Subject digest:
536fcae45029358d7fa5379d527856c0e34afb855de9ea8629326f60f9c5d6aa - Sigstore transparency entry: 206186762
- Sigstore integration time:
-
Permalink:
kraken-tech/timezone-tools@d843b366cd860074d76b21bea2b490498ca74d08 -
Branch / Tag:
refs/tags/v0.1.0.post1 - Owner: https://github.com/kraken-tech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_and_publish.yaml@d843b366cd860074d76b21bea2b490498ca74d08 -
Trigger Event:
push
-
Statement type: