I’m using timestamp in my php script to handle time in hours, minutes and seconds. Timestamps also record the date but I’m only using time 00:00:00.
For instance I’m caluclate difference in time
$start = strtotime("12:00:00");
$end = strtotime("20:00:00");
$difference = $end - $start;
or dividing time
$divide = $difference/3;
Should I continue using timestamps for these operations or is there a time-specific function in php?
An example of how to do this with
DateTime:Output: