Does UTC observe daylight saving time?

UTC (Coordinated Universal Time) is a standardized time that does not observe daylight saving time (DST). It is often used as a reference time and is equivalent to GMT (Greenwich Mean Time). In PHP, you can use the date_default_timezone_set() function to set the default timezone to UTC.

Watch a course Learn object oriented PHP

Example:

<?php

date_default_timezone_set('UTC');

echo "The current date and time in UTC is: " . date('Y-m-d H:i:s') . "\n";

You can also use the gmdate() function to get the current UTC date and time.

<?php

echo gmdate("Y-m-d H:i:s");

Note that it's important to have the correct timezone set on the server as well, otherwise, the output of the above function may not be accurate.