{"id":15290720,"url":"https://github.com/jhmaster2000/utc-date","last_synced_at":"2025-10-07T04:30:37.694Z","repository":{"id":57388941,"uuid":"365695521","full_name":"jhmaster2000/utc-date","owner":"jhmaster2000","description":"Experimental Date object overwrite for always using UTC dates.","archived":true,"fork":false,"pushed_at":"2022-03-26T08:38:32.000Z","size":671,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-03T03:19:10.269Z","etag":null,"topics":["date","datetime","es6","gmt","javascript","js","node","nodejs","npm","npm-module","npm-package","npmjs","overwritten-functions","utc","utcdatetime"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/utc-date","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jhmaster2000.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-09T07:41:29.000Z","updated_at":"2023-06-18T16:12:21.000Z","dependencies_parsed_at":"2022-08-22T15:10:45.027Z","dependency_job_id":null,"html_url":"https://github.com/jhmaster2000/utc-date","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jhmaster2000/utc-date","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhmaster2000%2Futc-date","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhmaster2000%2Futc-date/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhmaster2000%2Futc-date/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhmaster2000%2Futc-date/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jhmaster2000","download_url":"https://codeload.github.com/jhmaster2000/utc-date/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jhmaster2000%2Futc-date/sbom","scorecard":{"id":518953,"data":{"date":"2025-08-11","repo":{"name":"github.com/jhmaster2000/utc-date","commit":"b6cf4127a02d0e97b75a3f583d0493a01762ab4c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: ISC License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"14 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T02:28:45.024Z","repository_id":57388941,"created_at":"2025-08-20T02:28:45.024Z","updated_at":"2025-08-20T02:28:45.024Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278262443,"owners_count":25957938,"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","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","datetime","es6","gmt","javascript","js","node","nodejs","npm","npm-module","npm-package","npmjs","overwritten-functions","utc","utcdatetime"],"created_at":"2024-09-30T16:09:11.006Z","updated_at":"2025-10-07T04:30:37.384Z","avatar_url":"https://github.com/jhmaster2000.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"UTC Date\n========\n\n[![GitHub version][github-image]][github-url]\n[![downloads][downloads-image]][npm-url]\n[![license][license-image]][license-url]\n[![GitHub code size in bytes][size-image]][github-url]\n\n[![npm release][npm-image]][npm-url]\n[![node-current][node-image]][node-url]\n[![Build Status][travis-image]][travis-url]\n[![Coverage Status][coveralls-image]][coveralls-url]\n\nExperimental `Date` object overwrite for always using UTC dates by default.\n\n**Tested on:**\n- Windows = Node.js 14.x and 16.x with ESM\n- Linux = Node.js 14.x with ESM\n\n\u003e **Guaranteed to NOT work on Node.js 11.x and lower, this won't be fixed.**\n\n\u003e **This package is ESM only.**\n\n## Why?\nOn MacOS and Linux, if you wanted to achieve this, all you need to do is set `process.env.TZ` to `Etc/GMT`, however Windows does not respect this, forcing you to either change your entire system's timezone with a package like `set-tz`, which personally I found vastly inconvenient when trying to selfhost apps on my personal computer, or overwritting the entire `Date` object to force it to output only UTC values, which is what this package does for you.\n\n**This package probably does work on MacOS (untested) and Linux, but it is only truly needed on Windows.*\n\n#### Ok but this code is terrible!\nFeel free to improve it and make a PR. Bug reports are always welcome too.\n\n\u003e [**Updates Changelog**](https://github.com/jhmaster2000/utc-date/blob/master/CHANGELOG.md)\n\n## Installing\n```\nnpm i utc-date --save\n```\n\n## Usage\nOn your main file:\n```js\nimport 'utc-date';\n```\nThis must be placed as early as possible, prior to even other imports to ensure full **utc-date** usage even within other imports.\n\nAll `Date` instances from here on will now be using **utc-date**. This includes sub-files and modules. Does **NOT** include `Date` instances created *before* `utc-date` is loaded.\n\n### Getting the native Date object\nIf for some reason while using **utc-date** you require using the native Date object, you can import a clone of it from **utc-date** with:\n```js\nimport { NativeDate } from 'utc-date'\n```\nKeep in mind that unlike the `Date` overwrite, this is not global and `NativeDate` will only be accessible on the file it's imported on.\n\n### Settings\n**utc-date** supports a few customization settings through the use of ENV variables:\nSetting | Description\n-|-\n`UTCDATE_NO_OVERWRITE` | When set to any value, does not automatically overwrite the `Date` object with the `UTCDate` one. *(Defaults to overwriting if not set)*\n`UTCDATE_PATCH_CONSOLE`| When set to any value, will patch the console methods to make the logged UTC dates match what you expect from logging the native `Date` object. *(Defaults to not patching when not set)*\n`UTCDATE_PATCH_INSPECT`| When set to any value, will patch the `util.inspect` method to make the returned values for dates from **utc-date** match the return values of native dates. *(Defaults to not patching when not set)*\n\n\u003e Remember to keep in mind load order of `import`s when using these options, making sure the ENV variables are loaded into `process.env` before **utc-date** is imported.\n\n### Incompatibility\nDue to the nature of this package, it is naturally incompatible with any other package or local code that also overwrites/modifies the native `Date` object. Extending the `Date` object is fine as long as it's done *after* **utc-date** is loaded.\n\n[github-url]:https://github.com/jhmaster2000/utc-date\n[github-image]:https://img.shields.io/github/package-json/v/jhmaster2000/utc-date.svg\n[license-url]:https://github.com/jhmaster2000/utc-date/blob/master/LICENSE.md\n[license-image]:https://img.shields.io/npm/l/utc-date.svg\n[npm-url]:http://npmjs.org/package/utc-date\n[npm-image]:https://img.shields.io/npm/v/utc-date.svg?color=darkred\u0026label=npm%20release\n[downloads-image]:https://img.shields.io/npm/dt/utc-date.svg\n[node-url]:https://nodejs.org/en/download\n[node-image]:https://img.shields.io/node/v/utc-date.svg\n[size-image]:https://img.shields.io/github/languages/code-size/jhmaster2000/utc-date.svg\n[travis-url]:https://travis-ci.com/jhmaster2000/utc-date\n[travis-image]:https://img.shields.io/travis/com/jhmaster2000/utc-date.svg\n[coveralls-url]:https://coveralls.io/github/jhmaster2000/utc-date?branch=master\n[coveralls-image]:https://coveralls.io/repos/github/jhmaster2000/utc-date/badge.svg?branch=master\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhmaster2000%2Futc-date","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjhmaster2000%2Futc-date","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjhmaster2000%2Futc-date/lists"}