The internal real time clock (RTC) is usable-ish on esp32 chips (while on the esp8266 it often restarts on its own, possibly due to an overflow).
The RTC can get synced when calling the device registration API, and then used to add a local timestamp to the messages instead of having it attached by the APIs as they are received (current behavior).