I've come across a deprecated statement in a piece of code;
$this->_dateTimeZone = new \DateTimeZone($timezone);
$this->_dateFormatter->setTimeZoneId($timezone);
Gives
Deprecated: IntlDateFormatter::setTimeZoneId(): Use datefmt_set_timezone() instead, which also accepts a plain time zone identifier and for which this function is now an alias
I thought, OK, I'll just switch to the suggested way of setting the time-zone so I tried:
$this->_dateTimeZone = new \DateTimeZone($timezone);
datefmt_set_timezone($timezone);
Gives
Warning: datefmt_set_timezone() expects exactly 2 parameters, 1 given in ...
I tried searching the manual for this function here but the function is not listed anywhere.
My question is; what 2 parameters are required? I can't seem to find anything related to the given function - though it clearly exists in the later versions of PHP.