{"id":15579689,"url":"https://github.com/schickling/timemachine","last_synced_at":"2025-10-08T14:32:46.560Z","repository":{"id":10844361,"uuid":"13125119","full_name":"schickling/timemachine","owner":"schickling","description":"Test your time-dependent app by monkey patching the Date function and overriding your system time. ","archived":false,"fork":false,"pushed_at":"2021-01-18T14:07:39.000Z","size":88,"stargazers_count":138,"open_issues_count":5,"forks_count":35,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-29T14:06:36.470Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/schickling.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-09-26T14:43:43.000Z","updated_at":"2025-03-28T08:11:25.000Z","dependencies_parsed_at":"2022-08-30T20:01:00.432Z","dependency_job_id":null,"html_url":"https://github.com/schickling/timemachine","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schickling%2Ftimemachine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schickling%2Ftimemachine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schickling%2Ftimemachine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schickling%2Ftimemachine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schickling","download_url":"https://codeload.github.com/schickling/timemachine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247353731,"owners_count":20925329,"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":[],"created_at":"2024-10-02T19:20:31.943Z","updated_at":"2025-10-08T14:32:46.511Z","avatar_url":"https://github.com/schickling.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"timemachine [![Build Status](https://travis-ci.org/schickling/timemachine.png?branch=master)](https://travis-ci.org/schickling/timemachine)\n===========\n\nTest your time-dependent app by monkey patching the `Date` function and **overriding your system time**. Timemachine is compatible with global namespaces, RequireJS, CommonJS and NodeJS.\n\n## Installation\n\n### Bower\n```sh\n$ bower install timemachine\n```\n\n### NPM\n```sh\n$ npm install timemachine\n```\n\n## Usage\n\n### Config\n```js\ntimemachine.config({\n  dateString: 'December 25, 1991 13:12:59'\n});\n\nconsole.log(new Date()); // December 25, 1991 13:12:59\n```\n\nParameter \t\t| Description\t\t\t\t\t\t\t\t\t\t| Default\n---\t\t\t\t| ---\t\t\t\t\t\t\t\t\t\t\t\t| ---\n`dateString`\t| Date you want set as a string\t\t\t\t\t\t| `Thu, 01 Jan 1970 00:00:00 GMT`\n`timestamp`\t\t| Date you want set as a timestamp\t\t\t\t\t| `0`\n`difference`\t| Time offset in milliseconds\t\t\t\t\t\t| `0`\n`tick`\t\t\t| Whether the system clock should continue ticking\t| `false`\n`keepTime`\t\t| Whether the system time should be kept\t\t\t| `false`\n\n### Reset\n```js\ntimemachine.reset();\nconsole.log(new Date()); // Your real system time\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschickling%2Ftimemachine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschickling%2Ftimemachine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschickling%2Ftimemachine/lists"}