Set timestamp

is there a way to set the date to the current one so that having the date.now () signs that of today and not January 1, 1970? my code saves the temperature in memory every 2 minutes but I would need to know the exact timestamp of when it was detected so you can set the departure date for the date.now ()?

Iā€™m not sure of there is a convenient API for setting the timestamp, but you could calculate the RTC offset from latest sample and use the offset to fix the timestamps