{"id":16292375,"url":"https://github.com/filipsedivy/ntp","last_synced_at":"2025-04-09T08:46:17.057Z","repository":{"id":56982174,"uuid":"132376949","full_name":"filipsedivy/ntp","owner":"filipsedivy","description":"⏱ NTP reader","archived":false,"fork":false,"pushed_at":"2018-08-23T23:43:36.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T03:14:59.530Z","etag":null,"topics":["ntp-client","ntp-protocol","php-reader"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/filipsedivy.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":"2018-05-06T21:20:06.000Z","updated_at":"2020-01-09T10:43:33.000Z","dependencies_parsed_at":"2022-08-21T08:20:13.003Z","dependency_job_id":null,"html_url":"https://github.com/filipsedivy/ntp","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipsedivy%2Fntp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipsedivy%2Fntp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipsedivy%2Fntp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filipsedivy%2Fntp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/filipsedivy","download_url":"https://codeload.github.com/filipsedivy/ntp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008610,"owners_count":21032554,"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","ntp-protocol","php-reader"],"created_at":"2024-10-10T20:06:00.958Z","updated_at":"2025-04-09T08:46:17.039Z","avatar_url":"https://github.com/filipsedivy.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![NTP reader](.github/logo.png)\n\n[![Build Status](https://travis-ci.org/filipsedivy/NTP.svg?branch=master)](https://travis-ci.org/filipsedivy/NTP)\n\nIntroduction\n------------\n\nThe NTP reader is a class for reading data from the NTP server over the UDP / TCP port. The class allows:\n\n- read data from the NTP server\n- transfer output data to the [Carbon library](https://github.com/briannesbitt/Carbon) for processing time\n\n\nInstallation\n------------\n\nThe recommended way to is via [Composer](https://packagist.org/packages/filipsedivy/ntp):\n\n```\ncomposer require filipsedivy/ntp\n```\n\nIt requires PHP version 7.1 and supports PHP up to 7.2.\n\n### Tests\n\nTo run the tests, you must run this command via Composer\n\n```\ncomposer test\n```\n\n\nUsage\n-----\n\n```php\n$socket = FilipSedivy\\NTP\\Socket::create('europe.pool.ntp.org');\n$datetime = FilipSedivy\\NTP\\Client::getDateTime($socket);\n\n// Carbon library\necho $datetime-\u003etoDateTimeString();\n\n// Alternatively DateTime functions\necho $datetime-\u003eformat(...);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilipsedivy%2Fntp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilipsedivy%2Fntp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilipsedivy%2Fntp/lists"}