Skip to main content

Libfaketime wrapper.

Project description

Libfaketime is a C library which can fake the passage of time for UNIX applications, written by Wolfgang Hommel.

This library compiles it and gives some python convenience functions to run it, abstracting away the differences between running it under Linux and Mac OS X.

Get extra environment vars you need to run your process with:

>>> import faketime
>>> faketime.environment_vars("filename.txt")

Write a new time to file:

>>> import datetime
>>> faketime.change_time("filename.txt", datetime.datetime(2050, 6, 7, 10, 9, 22, 713689))
>>> import flyingcar

As soon as you have written the time to file, the new process should have picked up the new time.

Project details

Download files

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

Files for faketime, version
Filename, size File type Python version Upload date Hashes
Filename, size faketime- (34.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page