What strategies can be employed to troubleshoot and debug issues with time calculations in PHP scripts effectively?

Issue: When dealing with time calculations in PHP scripts, it's important to ensure that the time zone settings are correctly configured to avoid discrepancies in calculations. Code snippet:

// Set the default time zone to UTC
date_default_timezone_set('UTC');

// Perform time calculations
$start_time = strtotime('2022-01-01 10:00:00');
$end_time = strtotime('2022-01-01 12:00:00');
$duration = $end_time - $start_time;

// Display the duration in hours
echo 'Duration: ' . ($duration / 3600) . ' hours';