I have a cron which runs every minute calculates the difference between current time and an entry made. This cron will stop after business hours and run again when business hour starts.
I'm having an issue only when the entry is made on the evening (6pm) of tuesday and the difference is calculated with 1am of Wednesday.
How can I fix this?
Here is my code:
$ticket_created_timestamp = strtotime($ticket_created_time);
$current_time = date("H:i:s");
$current_timestamp = strtotime($current_time);
$time_difference_timestamp = $current_timestamp - $ticket_created_timestamp;