{"id":15354976,"url":"https://github.com/capaj/set-tz","last_synced_at":"2025-04-13T09:33:04.973Z","repository":{"id":15605865,"uuid":"78482402","full_name":"capaj/set-tz","owner":"capaj","description":"sets the timezone for your node.js process across all OSes","archived":false,"fork":false,"pushed_at":"2023-02-10T02:38:25.000Z","size":544,"stargazers_count":41,"open_issues_count":12,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T01:03:40.483Z","etag":null,"topics":["cli","oses","timezone","windows"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/capaj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null}},"created_at":"2017-01-10T00:34:36.000Z","updated_at":"2025-01-18T13:02:49.000Z","dependencies_parsed_at":"2024-10-31T19:04:46.253Z","dependency_job_id":null,"html_url":"https://github.com/capaj/set-tz","commit_stats":{"total_commits":25,"total_committers":3,"mean_commits":8.333333333333334,"dds":0.4,"last_synced_commit":"e087cc19aba67eef40791410c709bc4b43def143"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capaj%2Fset-tz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capaj%2Fset-tz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capaj%2Fset-tz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capaj%2Fset-tz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capaj","download_url":"https://codeload.github.com/capaj/set-tz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248690911,"owners_count":21146231,"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":["cli","oses","timezone","windows"],"created_at":"2024-10-01T12:21:56.150Z","updated_at":"2025-04-13T09:33:04.951Z","avatar_url":"https://github.com/capaj.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# set-tz DEPRECATED\n\nYou may need this for nodejs 16 and lower. Nodejs 17 behaves the same in regards to the timezone as in other OSes. See https://github.com/nodejs/node/issues/4230#issuecomment-955776233\n\nsets the timezone for your node.js process across all OSes\n\n## sample usage\n\n```javascript\nconst setTZ = require('set-tz')\nsetTZ('UTC')\n// that's it\n```\n\nIt will even convert between operating systems\n\n```javascript\nconst setTZ = require('set-tz')\nsetTZ('America/New_York')\n```\n\nThis will set timezone to `America/New_York` in non-Windows environments.\nIn Windows environments, it will set the timezone to Eastern Standard Time (because Windows doesn't respect IANA timezones).\n\n## Jest usage\n\nIt is common to run all your tests in UTC no matter which timezone your computer is in. This ensures your snapshots will run fine on you CI and on your local machine no matter where you are located. If you need that, then you can use a shortcut:\n\n```json\n  \"jest\": {\n    \"globalSetup\": ['set-tz/utc']\n  }\n```\n\n## Windows caveat\n\nOn Windows, when you call `setTZ()` it effectively changes your whole OS timezone so beware-if you kill the process, you'll need to manually revert back after you're done - I am assuming your process is short-lived. If you don't kill your process, it will revert your original timezone back for you.\n\nOn all other OSes, it just sets `process.env.TZ`, so beware that the current process won't have the timezome set. Only its children.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapaj%2Fset-tz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapaj%2Fset-tz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapaj%2Fset-tz/lists"}