Given any unix-timestamp T, I want to fetch the timestamp of the midnight before T.
The given timestamp can be any integer: now, today, (not too far[]) in the future or (not too far[]) in the past.
Is there a cleaner way then (pseudocode):
<?php $midnight = strtotime("{date('d',$ts)}-{date('m',$ts)}-{date('Y', $ts)} midnight"); ?> Thanks.
[*] somewhere between 1990 and 2020.