New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

timesetter

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

timesetter

A Python package to set system time regardless of operating system

  • 1.8
  • PyPI
  • Socket score

Maintainers
1

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 set function. 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, PermissionError will 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/*

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc