Custom date for a customer component

Hello,
As a dev, I want to to enforce the date value of a sensor activity to be able to push the correct date associate to the state value.
Context : I have made a sensor, but have a problem, I get the information from an external API, but only 48h less or more, not fix delay … after the real time moment…so for exemple, now I can get the information for the 02/05, can we imagine a solution to do this in a customer_component.