{"id":27171053,"url":"https://github.com/burghardt/libfaketime","last_synced_at":"2025-04-09T08:22:38.771Z","repository":{"id":74824784,"uuid":"603604702","full_name":"burghardt/libfaketime","owner":"burghardt","description":"a library that adds a filter to time() function calls","archived":false,"fork":false,"pushed_at":"2024-03-10T22:44:24.000Z","size":64,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-03-11T22:49:02.114Z","etag":null,"topics":["date","debugging","faketime","testing-library","time"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/burghardt.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-02-19T02:39:16.000Z","updated_at":"2024-03-11T22:49:02.114Z","dependencies_parsed_at":"2024-03-10T22:39:32.077Z","dependency_job_id":"d97d65f7-19aa-48cd-8d70-e626a8a85e46","html_url":"https://github.com/burghardt/libfaketime","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burghardt%2Flibfaketime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burghardt%2Flibfaketime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burghardt%2Flibfaketime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/burghardt%2Flibfaketime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/burghardt","download_url":"https://codeload.github.com/burghardt/libfaketime/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248000428,"owners_count":21031192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["date","debugging","faketime","testing-library","time"],"created_at":"2025-04-09T08:22:38.030Z","updated_at":"2025-04-09T08:22:38.754Z","avatar_url":"https://github.com/burghardt.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libFakeTime\n\nLibFakeTime - a library that adds a filter to time() function calls\n\n## Description\n\nDynamically linked programs that check the time using the `time()`\nor `gettimeofday()` functions would report fake time to make it possible\nto send an e-mail to a friend with the date of his birthday after this\ndate has already passed if one forgot.\n\nYou can also use it to warp time in `xclock` or to test programs dealing\nwith expiration dates (i.e., shareware programs work forever,\nSSL certificates never expire, and debugged programs start each time\nwith the same time settings).\n\nFor more information about library usage, refer to the manual\n([libfaketime.8](libfaketime.8)).\n\n## Getting Started\n\nThese instructions will get you a copy of the project up and running on your\nlocal machine.\n\n### Downloading\n\nSimply clone repository.\n\n    git clone https://github.com/burghardt/libfaketime.git\n\n### Building from sources\n\nBuild sources with `make` to create binary `libfaketime.so.1`.\n\n    make\n\n#### Build architecture\n\n`CFLAGS` and `LDFLAGS` allow building for foreign architecture on multilib\nsystems (i.e. 32-bit library on 64-bit userland).\n\n    env CFLAGS=-m32 LDFLAGS=-m32 make\n\n#### Build options\n\nLibFakeTime library has two optional build-time configuration options\n(see [Makefile](Makefile)).\n\n * `-DDEBUG` (optional) This enables verbose debug code. Not very useful\n             for regular usage, but it might be helpful for troubleshooting.\n\n * `-DKILLER` (optional) This enables the killer code. If the library cannot\n              read fake time from the file, it will kill the process. Helpful\n              with programs writing timestamps or invalidating something after\n              the expiration date.\n\nWarning: `-DKILLER` option can kill your `/sbin/init` early during boot process\nrendering system unable to boot if enabled system-wide!\n\n### Installing\n\nRun `make install` (as root) to install binary library and manual page.\n\n    sudo make install\n\nThe `Makefile` install target will only copy the library and man page to the\nappropriate directories. To activate libfaketime, either on a per-process\nbasis or a system-wide basis, see the section \"Installing libfaketime\"\non the manual page.\n\n## Usage\n\nConfigure fake timestamp, preload library and run target program.\n\n    mkdir -p  ~/.libfaketime.d\n    date -d 20200101 +%s \u003e ~/.libfaketime.d/date.fake\n    env LD_PRELOAD=libfaketime.so.1 date -R # prints \"Wed, 01 Jan 2020  00:00:00 +0100\"\n\n## Acknowledgments\n\nI used some code from:\n - Anubis (GPL): http://www.gnu.org/projects/anubis/,\n - libsafe (LGPL): http://www.bell-labs.com/org/11356/libsafe.html,\n\n## Footnote\n\nSee http://github.com/burghardt/libfaketime for more information and new\nreleases. Send comments and bug reports to \u003ckrzysztof@burghardt.pl\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburghardt%2Flibfaketime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fburghardt%2Flibfaketime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fburghardt%2Flibfaketime/lists"}