0

I am working from the example sketch in that installed with the ESP32 Dev Module into the Arduino IDE. It includes <WiFi.h> and "time.h". I have a number of questions about how to use the clock that is set up with configTime using NTP. I am trying to find the documentation, but I'm having difficulty identifying exactly who is providing me the "time.h" header file, and of course, there are a lot of different time.h header files out there so googling is difficult.

Where can I find the documentation for this particular header?


Example questions:

  • Can the time be set manually without a WiFi connection?
  • Can the timezone be changed without connecting to NTP again?
  • Can I get the time as a Unix Time Stamp? (Yes)
  • Can I arrange for a function callback at a certain time? (I'm aware I can use the timer library for this but I'm hoping for something like a callback at 4:20p every Saturday)
| improve this question | | | | |
  • have you checked in the library for documentation? – jsotola Jan 15 at 22:13
2

time.h is provided by the compiler (more specifically the C library in use in the compiler).

I believe the xtensa-esp32 compiler uses newlib as the C library. If that is the case, the documentation is here: https://sourceware.org/newlib/libc.html#Timefns

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.