I need to calculate the difference between two dates in hours and in minutes which is what the code below does. The only issue I have is that the dates and the location (timezone) has to be input by the user. How do I achieve that? Can be a different language from PHP as I only need a flowchart and the pseudocode.
$departure = new DateTime('8pm March 27, 2016 America/New_York');
$arrival = new DateTime('7:20am March 28, 2016 Europe/London');
$flighttime = $departure->diff($arrival);
echo "$flighttime-> h hours $flight_time->i minutes";
Output: 7 hours 20 minutes