I have a cron job that runs at midnight which resets all user limits for that day. I want to display something along the lines of Your limits reset in 1 hour 14 minutes
to my users. Basically a countdown until midnight (server time).
At the moment I'm using this to find midnight:
strtotime('tomorrow 00:00:00');
which returns a timestamp for when midnight rolls over, but I have no idea how to display a user friendly countdown. Is there a PHP library for this or is this pretty easy without a library?