For example, I am designing an events post site.
I want auto delete any events that the event date is at least 1 day older than current date.
No problem for the php programming.
get the current data (server clock), check the events date and delete the old records.
My problem is that for some very rare cases.
Say if for extrem cases I have 1000 new events saved in database. But somehow, I or the the hosting company do the server maintenance, and reset the time clock of the server, in case in the maintenace, the server time clock was set up wrong say 2005, was set up as 2006.
And in these few error mintues when the server clock was set up wrong, my php will still check the database and then it will automatiaclly delete all these events by mistake.
How to prevent this and still make my auto delete old events working?
Specially, if the client hosts the site in another hosting company, and if that hosting company fooling around with the time clock for a few minutes when they do some server maintenance, and then the client will lose all his events but the hosting company will not tell the truth. My clients will come to me asking where are his events in the database?
Plus, we cannot request that hosting company never ever play with the server time clock.
Any suggestions? Thanks!
Thanks!