The first one will return the difference in seconds between two timezones.
This creates a date object which we can use in our script.datedefaulttimezoneset(America/Chicago) date new DateTime("now") echo date->format(d-m-y H:i:s) echo "
" date new DateTime "" Specifies the default timezone. Phpiniall. PHP indicates the earliest version of PHP that supports the function.datetimeset(). Sets the time. 5. 15. datetimezoneget().