User Guide
Timesetter is a Python package to set system time regardless of operating system
Supported Platforms
- Windows
- Linux
- macOS
Tips
- This package aims to set system time in the precision of below milliseconds.
- You need to pass a datetime object to the
setfunction. If the timezone information was not included in the time object(naive), the package will assume that it's identical to the system. - You need to run your Python code with administration privileges for this package to work properly. Otherwise,
PermissionErrorwill be raised. This applies to all platforms.
How to Use
Install the package from PyPI
pip install timesetter
Then import it in your Python code
from datetime import datetime
import timesetter
target_time = datetime(year=2021, month=3, day=29, hour=15, minute=38, second=12)
timesetter.set(target_time)
For Maintainers
Rules
Type hints as well as stub files for Python should be provided for the maintainability of the code. Turn on strict type checking in whatever IDE you are using. If some third party packages doesn't support type checking very well, then you can write # type: ignore to suppress the warning.
Command Line Scripts
Install packages written in requirements.txt from PyPI
pip install -r ./requirements.txt
Generate the distribution archive to /dist
python -m build
Upload the package to PYPI
python -m twine upload dist/*
Metadata
Release files for timesetter 1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| timesetter-1.8.tar.gz | 20.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| timesetter-1.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.0 kB
Release files / timesetter-1.8.tar.gz
| Download URL | timesetter-1.8.tar.gz |
|---|---|
| Size | 20.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee6523b155f6144e618217a58569098997b122b187d9a1a0940a5d32282e7da0
|
|
BLAKE2b-256 checksum How to use checksums |
6262f9b35aeb93699628aec02574c3de06455632541693a1ced8c052d9429e8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Release files / timesetter-1.8-py3-none-any.whl
| Download URL | timesetter-1.8-py3-none-any.whl |
|---|---|
| Size | 20.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1e207284c5027d512d3cea8292fbbe07bf5a1e0bd5b65983c4f5ddb5faa1d704
|
|
BLAKE2b-256 checksum How to use checksums |
6750f2d1f4f5cd2fad7061632a16144ff2ccf1640a452a2114041b4c4cf60d40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|