Fundamental questions about time_t variable and "time" function.
Posted: Tue Jun 05, 2018 9:55 am
Hi,
It may be listed somewhere or the question has been answered before but I can't find it as I can't search the forum for "type_t" exactly. It always returns the search results for "time" and says it ignored the "t" and the underscore which results in a few thousand search results. So: here are my questions about "time_t" and the "time" function.
1) What type of variable is time_t? a signed or unsigned 32 bit integer or something else entirely ?
2) What date/time does 0 in variable time_t represent? in FreeRTOS it represents 01/01/2000 00:00:00, in sntp it is 01/01/1990 00:00:00, in Unix/Linux it is 01/01/1970 00:00:00 => so what is the base value in ESP32?
3) is there a description somewhere of how the "time" function works in ESP32? I have looked through all sorts of header files and find abstractions such as _EXFUN etc... but I failed to find the function that actually reads the time from the chip's RTC. Just knowing which file to look at would be OK as well.
It may be listed somewhere or the question has been answered before but I can't find it as I can't search the forum for "type_t" exactly. It always returns the search results for "time" and says it ignored the "t" and the underscore which results in a few thousand search results. So: here are my questions about "time_t" and the "time" function.
1) What type of variable is time_t? a signed or unsigned 32 bit integer or something else entirely ?
2) What date/time does 0 in variable time_t represent? in FreeRTOS it represents 01/01/2000 00:00:00, in sntp it is 01/01/1990 00:00:00, in Unix/Linux it is 01/01/1970 00:00:00 => so what is the base value in ESP32?
3) is there a description somewhere of how the "time" function works in ESP32? I have looked through all sorts of header files and find abstractions such as _EXFUN etc... but I failed to find the function that actually reads the time from the chip's RTC. Just knowing which file to look at would be OK as well.