I'm having a seemingly simple problem with setting the default timezone in PHP. I'm trying to use default_timezone_set()
to affect my mktime()
function unsuccessfully.
In short, my server is set to UTC and I'm setting the timezone using default_timezone_set()
, then calling mktime()
to set a database date-time stamp.
However, the time in milliseconds that returns, comes back as UTC time. I echoed out the default_timezone_get()
and it does indeed return as the timezone I'm setting and can't seem to determine why once I've successfully set the timezone that it fails to affect the mktime()
function.
Am I missing something here? Isn't setting the default timezone supposed to affect all the date/time functions in PHP?