The line gives an error when browsing. what should I do?
this is full section;
// Set up time zone from language file for multi-language site
// Read http://www.php.net/date_default_timezone_set for details
// and http://www.php.net/timezones for supported time zones
if (!empty($time_zone)) {
$TIME_ZONE = $time_zone;
}
if (!empty($TIME_ZONE)) {
date_default_timezone_set($TIME_ZONE); // ***THIS LINE***
}
i need to manually change the line into this; date_default_timezone_set('Asia/Kuala_Lumpur');
everytime after generated the phpmaker.
where should I put this code at first to avoid manually editing.
( ! ) Notice: date_default_timezone_set(): Timezone ID ‘+8’ is invalid in F:\wamp64\www\membership2021\src\Language.php on line 144
and that line 144 pointed to =
date_default_timezone_set($TIME_ZONE);
php.ini already configured as=
[Date]
; Defines the default timezone used by the date functions
; PHP: Runtime Configuration - Manual
date.timezone =“Asia/Kuala_Lumpur”
Server Event/Global/language_load also configured =
function Language_Load()
{
date_default_timezone_set(‘Asia/Kuala_Lumpur’);
}
Locale also configured.
Only database time zone under advanced setting not filled anything. It gives the same error no matter what timezone I put it on.
It seems that your PHP version does not accept “Asia/Kuala_Lumpur” although it is listed under PHP docs. If you can upgrade your PHP version, better try upgrade. If you can’t, you may try a supported time zone from the List of Supported Timezones, e.g. Etc/GMT-8 (read the warnings).