{"id":22045251,"url":"https://github.com/nigelhorne/ntpdate","last_synced_at":"2026-04-28T20:39:03.149Z","repository":{"id":148208604,"uuid":"94208124","full_name":"nigelhorne/ntpdate","owner":"nigelhorne","description":"Simple NTP client","archived":false,"fork":false,"pushed_at":"2025-03-04T12:53:19.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-04T13:42:30.838Z","etag":null,"topics":["ntp-client","ntpdate","perl","perl5"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nigelhorne.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-13T12:00:00.000Z","updated_at":"2025-03-04T12:53:23.000Z","dependencies_parsed_at":"2025-02-14T15:38:19.658Z","dependency_job_id":null,"html_url":"https://github.com/nigelhorne/ntpdate","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/nigelhorne%2Fntpdate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2Fntpdate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2Fntpdate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nigelhorne%2Fntpdate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nigelhorne","download_url":"https://codeload.github.com/nigelhorne/ntpdate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245111946,"owners_count":20562512,"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":["ntp-client","ntpdate","perl","perl5"],"created_at":"2024-11-30T13:12:25.110Z","updated_at":"2026-04-28T20:39:03.144Z","avatar_url":"https://github.com/nigelhorne.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"ntpdate\n=======\n\n# NTP Time Sync Script\n\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/nigelhorne/ntpdate/ntpdate.yml?branch=master)\n![Perl Version](https://img.shields.io/badge/perl-5.34+-blue)\n\nThis Perl script synchronizes the system time with an NTP server and updates the system clock.\nPlease report any bugs or feature requests to the author.\nThis module is provided as-is without any warranty.\n\n## Features\n- Retrieves network time using an NTP server.\n- Implements retry logic (up to 3 attempts) if time retrieval fails\n- Converts and formats the time using `DateTime`.\n- Supports configurable timezones via `config.cfg`.\n- Logs events using `syslog`.\n- Updates the system clock (requires sudo privileges).\n\n## Requirements\n- Perl\n- Required Perl Modules:\n  - `Net::NTPTime`\n  - `DateTime`\n  - `Sys::Syslog`\n  - `Config::Abstraction`\n- Linux-based system, or similar (for `date` command execution)\n\n## Installation\n### Clone the Repository\n```sh\ngit clone https://github.com/nigelhorne/ntpdate.git\ncd ntpdate\n```\n\n### Install Dependencies\n```sh\ncpanm Net::NTPTime DateTime Sys::Syslog Config::Abstraction\n```\n\n## Usage\nRun the script with an NTP server:\n```sh\nperl ./ntpdate pool.ntp.org\n```\n\n## Configuration\nTo change the default timezone, create a `~/conf/ntpdate` file:\n```ini\ntimezone=America/New_York\n```\n\n## GitHub Actions\nThis project includes a GitHub Actions workflow to:\n- Install dependencies\n- Run the script with a test NTP server\n- Lint the Perl script\n\n## Logging and Error Handling\n- If the script fails to retrieve the time, it will retry up to **3 times** before exiting with an error.\n- Logs are recorded via C\u003csyslog\u003e for debugging and monitoring.\n\n## **Licence Agreement**\n\n### **Personal Use:**\nThis program is **free to use** for a **single individual** on **one computer** for **personal, non-commercial purposes only**.\n\n### **Restricted Use:**\nAny other use—including but not limited to **commercial, charitable, educational, or government organizations**—**requires a written license agreement**.\n\n### **License Application:**\nOrganizations or individuals falling outside the personal-use terms **must request written permission** and obtain a license before using this program.\n\nFor licensing enquiries, please contact: **\u003c njh @ nigelhorne.com \u003e**.\n\nThis module is provided as-is without any warranty.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnigelhorne%2Fntpdate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnigelhorne%2Fntpdate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnigelhorne%2Fntpdate/lists"}