gmag11 / ESPNtpClient

High accuracy NTP library for ESP32 and ESP8266
MIT License
118 stars 25 forks source link

how to retrieve the hour, minute and second in 3 variables? #10

Closed stef-ladefense closed 3 years ago

stef-ladefense commented 3 years ago

Hello I'm going to ask a silly question how to retrieve the hour, minute and second in 3 variables?

thx

gmag11 commented 3 years ago

Espressif include UNIX compatible time library. You can use standard function calls to get time. Check this doc: https://ftp.gnu.org/old-gnu/Manuals/glibc-2.2.3/html_chapter/libc_21.html

The function you are looking for is localtime ()

stef-ladefense commented 3 years ago

merci ! avant j'utilisais timelib, qui était très bien, avec ta nouvelle librairie, çà génère des pages d'erreurs !