{"id":19240792,"url":"https://github.com/aharshac/easyntpclient","last_synced_at":"2026-03-08T05:33:09.222Z","repository":{"id":53084069,"uuid":"95758686","full_name":"aharshac/EasyNTPClient","owner":"aharshac","description":"Library to read time from Network Time Protocol (NTP) servers.","archived":false,"fork":false,"pushed_at":"2021-04-07T12:16:19.000Z","size":12,"stargazers_count":25,"open_issues_count":7,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-21T08:45:06.644Z","etag":null,"topics":["arduino","arduino-library","embedded","esp8266","esp8266-arduino","espressif","iot","nodemcu","nodemcu-arduino","ntp","ntp-client","ntp-library","ntp-parser"],"latest_commit_sha":null,"homepage":null,"language":"C++","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/aharshac.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}},"created_at":"2017-06-29T08:58:25.000Z","updated_at":"2024-08-15T05:14:22.000Z","dependencies_parsed_at":"2022-09-12T11:14:36.762Z","dependency_job_id":null,"html_url":"https://github.com/aharshac/EasyNTPClient","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/aharshac/EasyNTPClient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aharshac%2FEasyNTPClient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aharshac%2FEasyNTPClient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aharshac%2FEasyNTPClient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aharshac%2FEasyNTPClient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aharshac","download_url":"https://codeload.github.com/aharshac/EasyNTPClient/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aharshac%2FEasyNTPClient/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30246730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T00:58:18.660Z","status":"online","status_checked_at":"2026-03-08T02:00:06.215Z","response_time":56,"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":["arduino","arduino-library","embedded","esp8266","esp8266-arduino","espressif","iot","nodemcu","nodemcu-arduino","ntp","ntp-client","ntp-library","ntp-parser"],"created_at":"2024-11-09T17:09:01.369Z","updated_at":"2026-03-08T05:33:04.210Z","avatar_url":"https://github.com/aharshac.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EasyNTPClient \n\n[![Collaborizm](https://img.shields.io/badge/Collaborizm-Join%20now-blue.svg)](https://www.collaborizm.com/)\n[![Build Status](https://travis-ci.org/aharshac/EasyNTPClient.svg?branch=master)](https://travis-ci.org/aharshac/EasyNTPClient)    \n\nArduino library to read time from Network Time Protocol (NTP) servers.\n\n\u0026nbsp;\n\n## Features\n- Handles all heavy lifting involved with managing connections to and parsing time from an NTP server.\n- As easy as providing a **UDP** object to the constructor during initialization.\n- Works on **Arduino** and **ESP8266**.\n\n\u0026nbsp;\n\n## Examples    \n1. **NodeMCU**    \nUsing EasyNTPClient on a NodeMCU (ESP8266)     \n\n2. **ArduinoEspWifiShield**    \nUsing EasyNTPClient on an Arduino UNO with an ESP-01 (ESP8266) WiFi module.    \nBy [**Claran Martis**](https://www.collaborizm.com/profile/SJne7FcMg)\n\n\u0026nbsp;\n\n## Reference\n### Class **EasyNTPClient**\n#### 1. Initialization ####\n1. No frills \n```c\nEasyNTPClient(UDP \u0026udp)\n\nParameters:\n    udp: Reference to an UDP object.\nReturns:\n    EasyNTPClient object.\n```\n\n2. Custom server pool \n```c\nEasyNTPClient(UDP\u0026 udp, const char* serverPool)\n\nParameters:\n    udp: Reference to an UDP object.\n\tserverPool: NTP server pool. Default = \"pool.ntp.org\"\nReturns:\n    EasyNTPClient object.\n```\n\n3. Time offset\n```c\nEasyNTPClient(UDP\u0026 udp, const char* serverPool, int offset);\n\nParameters:\n    udp: Reference to an UDP object.\n\tserverPool: NTP server pool domain name. Default = \"pool.ntp.org\"\n\toffset: Difference from UTC in seconds. Default = 0\nReturns:\n    EasyNTPClient object.\n```\n\n#### 2. Methods ###    \n1. Get time offset\n```c\nint getTimeOffset()\n\nReturns:\n    EasyNTPClient object.\n```\n\n2. Set time offset\n```c\nvoid setTimeOffset(int offset);\n\nParameters:\n    offset: Difference from UTC in seconds.\n```\n\n3. Get time in UNIX format\n```c\nunsigned long getUnixTime();\n\nReturns:\n    UTC time in UNIX time format (seconds)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faharshac%2Feasyntpclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faharshac%2Feasyntpclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faharshac%2Feasyntpclient/lists"}