Get data every hour but want to add that data to HA the hour before

I have connected a rasberry pi to my power intake. Where I get data such as power usage. I get this data every second, and every hour I get a total used that hour. If I pull this data to Home Assistant the data is added after the hour and thus it gets added on the wrong hour.

I gather the data on the Pi in node red then send it to my nodred on my HA through MQTT, where I send it to HA with the entity.

Is it possible to add a timestamp to the message to HA and send it with the sensor entity?
Got any good ideas?
Is it possible to change the clock on home assistant to always be 1 minute ahead? I think this would be the easiest :stuck_out_tongue

Or is it possible to automatically change it when it enters mysql database?

Looks like I can set an ofset on my sql database. I will try that.