{"id":21875166,"url":"https://github.com/mfbx9da4/ng-server-time","last_synced_at":"2026-05-13T05:37:08.242Z","repository":{"id":65457947,"uuid":"53693167","full_name":"mfbx9da4/ng-server-time","owner":"mfbx9da4","description":"Time synchronization directive between angular and node server using socket.io. Emulating NTP protocol.","archived":false,"fork":false,"pushed_at":"2018-04-29T21:10:22.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-21T23:27:49.676Z","etag":null,"topics":["angular","ntp","socket"],"latest_commit_sha":null,"homepage":"http://ng-server-time.herokuapp.com/","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/mfbx9da4.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":"2016-03-11T19:57:06.000Z","updated_at":"2020-04-15T10:07:47.000Z","dependencies_parsed_at":"2023-01-24T12:45:29.412Z","dependency_job_id":null,"html_url":"https://github.com/mfbx9da4/ng-server-time","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mfbx9da4/ng-server-time","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfbx9da4%2Fng-server-time","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfbx9da4%2Fng-server-time/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfbx9da4%2Fng-server-time/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfbx9da4%2Fng-server-time/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mfbx9da4","download_url":"https://codeload.github.com/mfbx9da4/ng-server-time/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mfbx9da4%2Fng-server-time/sbom","scorecard":{"id":638689,"data":{"date":"2025-08-11","repo":{"name":"github.com/mfbx9da4/ng-server-time","commit":"377cb8d6d7b92f2b3814617de3b29954fa09c48b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"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":"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":"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":"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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 1/18 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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T10:01:46.326Z","repository_id":65457947,"created_at":"2025-08-21T10:01:46.326Z","updated_at":"2025-08-21T10:01:46.326Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32970033,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T05:31:44.146Z","status":"ssl_error","status_checked_at":"2026-05-13T05:31:23.775Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["angular","ntp","socket"],"created_at":"2024-11-28T07:14:45.611Z","updated_at":"2026-05-13T05:37:08.223Z","avatar_url":"https://github.com/mfbx9da4.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ng Server Time\n\nSynchronizes local browser time with server time\nusing clock synchronization algorithm, similar to\nNTP.\n\n## [Demo](http://ng-server-time.herokuapp.com/)\n## [Demo code](https://github.com/mfbx9da4/ng-server-time-example)\n\n## Installation\n\n1. Ensure angular, socket.io and ng-server-time are installed correctly\n\n    ```\n    npm install socket.io\n    npm install angular\n    npm install ng-server-time\n    ```\n\n2. Ensure you have an angular socket.io factory such as this one, it is required by the server time factory:\n\n    ```js\n    app.factory('socket', function() {\n       var socket = io.connect();\n       return socket;\n    });\n    ```\n3. Include `ng-server-time-factory.min.js`:\n\n   ```html\n    \u003cscript src=\"/socket.io.js\"\u003e\u003c/script\u003e\n    \u003cscript src=\"/angular.min.js\"\u003e\u003c/script\u003e\n    \u003cscript src=\"/ng-server-time-factory.min.js\"\u003e\u003c/script\u003e\n    \u003cscript src=\"/my-angular-app.js\"\u003e\u003c/script\u003e\n   ```\n4. Initilaize the socket on the server:\n\n    ```js\n    var server_time = require('ng-server-time');\n\n    io.sockets.on('connection', function (socket) {\n      server_time.init(socket);\n    });\n    ```\n\n###Usage\n\n```js\napp.controller('MainController', function($scope, ServerTime){\n    // Date.now() on the server\n    $scope.now = ServerTime.now();\n\n    // new Date() on the server\n    $scope.new = ServerTime.new();\n\n    // get offset in milliseconds between current browser\n    // time and server time\n    $scope.getOffset = ServerTime.getOffset();\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfbx9da4%2Fng-server-time","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmfbx9da4%2Fng-server-time","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmfbx9da4%2Fng-server-time/lists"}