What is the purpose of using date_default_timezone_set() in PHP?

The purpose of using date_default_timezone_set() in PHP is to set the default timezone used by all date/time functions in a script. This is important because it ensures that date/time calculations and outputs are accurate and consistent across different timezones.

// Set the default timezone to UTC
date_default_timezone_set('UTC');