Aoife’s right, and we went down the same road on our first trackers. What we ended up doing: two cases.
When the reading goes out right away, send a flat object with no ts. Hermetry stamps it with the time it arrived, which for a 10-minute temperature is plenty.
For the buffered ones you need a clock you trust. A DS3231 RTC module costs a few dollars, drifts about a minute a year, and runs from a coin cell while the ESP sleeps. Set it from NTP every time the hotspot is up and read it on every wake.
Don’t make up times. If the clock isn’t set yet (fresh coin cell, never been online) mark those readings and drop them or send them without ts. Hermetry refuses a record more than 10 minutes in the future as bad_ts, and a record in the past lands at the wrong place on the chart, which nobody notices for months. ts has to be milliseconds UTC. All on Timestamps, late and duplicate readings.
Still waiting for the gateway to reconnect.