I have moment and door magnet sensors (Xiaomi) running on HA within a Synology DSM system.
Problem is, whenever my DSM restarts (obviously along HA on docker), in my Lovelace card (where I have, “movement two hours ago”, the “two hours ago” starts representing whenever the system was restarted.
I was on holidays and I got obviously scared because I didn’t know that at the time.
It would be a pain if you have many sensors but you could create automations to store the date/time of the last movement to an input_datetime for each sensor. That would survive restarts.
The OP isn’t talking about true timers. They are asking about the “last_changed”/“last_updated” attributes of certain sensors which get reset to the last restart time of HA by default.