{"id":16148905,"url":"https://github.com/erriez/erriezntpclient","last_synced_at":"2026-04-16T08:31:18.214Z","repository":{"id":85067612,"uuid":"295222782","full_name":"Erriez/ErriezNTPClient","owner":"Erriez","description":"NTP client library for Arduino to retrieve UNIX Epoch UTC time","archived":false,"fork":false,"pushed_at":"2020-09-13T20:08:25.000Z","size":373,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T21:33:52.688Z","etag":null,"topics":["arduino","avr","client","documentation","epoch","erriez","esp32","esp8266","ethershield","examples","library","network","ntp","sync","time","unix"],"latest_commit_sha":null,"homepage":"https://github.com/Erriez/ErriezArduinoLibraries","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/Erriez.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-13T19:30:24.000Z","updated_at":"2024-10-12T17:30:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"33c133aa-86d2-47cd-9880-cb67bd9df4cf","html_url":"https://github.com/Erriez/ErriezNTPClient","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Erriez/ErriezNTPClient","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erriez%2FErriezNTPClient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erriez%2FErriezNTPClient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erriez%2FErriezNTPClient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erriez%2FErriezNTPClient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Erriez","download_url":"https://codeload.github.com/Erriez/ErriezNTPClient/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Erriez%2FErriezNTPClient/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31877430,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T07:36:03.521Z","status":"ssl_error","status_checked_at":"2026-04-16T07:35:53.576Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["arduino","avr","client","documentation","epoch","erriez","esp32","esp8266","ethershield","examples","library","network","ntp","sync","time","unix"],"created_at":"2024-10-10T00:35:13.858Z","updated_at":"2026-04-16T08:31:18.197Z","avatar_url":"https://github.com/Erriez.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Erriez NTP Client library for Arduino\n[![Build Status](https://travis-ci.org/Erriez/ErriezNTPClient.svg?branch=master)](https://travis-ci.org/Erriez/ErriezNTPClient)\n\nThis is a minimized NTP Client library for Arduino to retrieve UNIX Epoch UTC from NTP time servers.\n\n\n## Library features\n\n* Retrieve UNIX Epoch UTC time from network time servers\n* Compatible with `time.h`\n* Timeout handling\n\n\n## Supported hardware\n\n* Arduino UNO with EtherShield (Wiznet W5100 Ethernet controller)\n* ESP8266 WiFi\n* ESP32 WiFi\n\n\n## Documentation\n\n- [Online HTML](https://erriez.github.io/ErriezNTPClient)\n- [Doxygen PDF](https://github.com/Erriez/ErriezNTPClient/raw/master/ErriezNTPClient.pdf)\n\n\n## Example output\n\n```c++\nErriez ESP8266 NTP example\nConnecting to 'wifi'...OK\nEpoch: 1600025290\nUTC:   Sun Sep 13 19:28:10 2020\n```\n\n\n## Example ESP8266 / ESP32\n\n```c++\n#if defined(ARDUINO_ARCH_ESP8266)\n#include \u003cESP8266WiFi.h\u003e\n#elif defined(ARDUINO_ARCH_ESP32)\n#include \u003cWiFi.h\u003e\n#endif\n\n#include \u003cErriezNTPClient.h\u003e\n\n// WiFi SSID and Password\n#define WIFI_SSID           \"\"\n#define WIFI_PASSWORD       \"\"\n\n// \"pool.ntp.org\", \"time.nist.gov\" or NTP server IP address\n#define NTP_SERVER          \"pool.ntp.org\"\n\nErriezNTPClient ntp(NTP_SERVER);\n\n\nvoid setup()\n{\n    // Initialize serial\n    delay(500);\n    Serial.begin(115200);\n    Serial.println(F(\"\\nErriez NTP client ESP8266 / ESP32 example\"));\n\n    // Initialize WiFi\n    Serial.print(F(\"Connecting to '\"));\n    Serial.print(WIFI_SSID);\n    Serial.print(F(\"'\"));\n\n    // Connect to your WiFi router\n    WiFi.begin(WIFI_SSID, WIFI_PASSWORD);\n\n    // Wait for connection\n    while (WiFi.status() != WL_CONNECTED) {\n        delay(500);\n        Serial.print(\".\");\n    }\n    Serial.println(\"OK\");\n}\n\nvoid loop()\n{\n    time_t t;\n\n    // Get epoch\n    t = ntp.getEpoch();\n\n    // Print result\n    if (t \u003e 0) {\n        Serial.print(F(\"Epoch: \"));\n        Serial.println((uint32_t)t);\n        Serial.print(F(\"UTC:   \"));\n        Serial.println(ctime(\u0026t));\n    } else {\n        Serial.println(F(\"Timeout\"));\n    }\n\n    delay(10000);\n}\n```\n\n\n## Example AVR (ATMega328 / ATMega2560)\n\n```c++\n#include \u003cEthernet.h\u003e\n#include \u003cErriezNTPClient.h\u003e\n\n// \"pool.ntp.org\", \"time.nist.gov\" or NTP server IP address\n#define NTP_SERVER          \"pool.ntp.org\"\n\nErriezNTPClient ntp(NTP_SERVER);\n\n// Newer Ethernet shields have a MAC address printed on a sticker on the shield\nuint8_t mac[] = {\n    0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED\n};\n\n\nvoid setup()\n{\n    // Initialize serial\n    delay(500);\n    Serial.begin(115200);\n    Serial.println(F(\"\\nErriez NTP client AVR example\"));\n\n    // Start Ethernet and UDP\n    if (!Ethernet.begin(mac)) {\n        Serial.println(F(\"Failed to configure Ethernet using DHCP\"));\n\n        // Check for Ethernet hardware present\n        if (Ethernet.hardwareStatus() == EthernetNoHardware) {\n            Serial.println(F(\"Ethernet shield was not found.\"));\n        } else if (Ethernet.linkStatus() == LinkOFF) {\n            Serial.println(F(\"Ethernet cable is not connected.\"));\n        }\n    }\n}\n\nvoid loop()\n{\n    time_t t;\n\n    // Get epoch\n    t = ntp.getEpoch();\n\n    // Print result\n    if (t \u003e 0) {\n        Serial.print(F(\"Epoch: \"));\n        Serial.println((uint32_t)t);\n\n        // A UNIX offset is needed for AVR target\n        t -= UNIX_OFFSET;\n\n        Serial.print(F(\"UTC:   \"));\n        Serial.println(ctime(\u0026t));\n    } else {\n        Serial.println(F(\"Timeout\"));\n    }\n\n    delay(10000);\n}\n```\n\n\n## Library installation\n\nPlease refer to the [Wiki](https://github.com/Erriez/ErriezArduinoLibraries/wiki) page.\n\n\n## Other Arduino Libraries and examples from Erriez\n\n[Erriez Libraries](https://github.com/Erriez/ErriezArduinoLibraries)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferriez%2Ferriezntpclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferriez%2Ferriezntpclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferriez%2Ferriezntpclient/lists"}