Request Nhờ anh em php giúp

raikis

Junior
Joined
Jan 19, 2013
Messages
248
Reactions
208
MR
0.031
Bị lỗi timezone mà fix hoài ko song mong các bác chỉ giao
[27-Sep-2018 14:50:00 UTC] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. user.php on line 55

file user.php dong 55 ".date('m/d/Y h:i:s a', time())

file config mình đạt
"timezone"=>"America/New_York",

Mong mọi người chỉ giáo
 

tqmytown

Junior
Joined
Apr 21, 2015
Messages
111
Reactions
34
MR
0.005

emyeusss7

Legendary
Joined
Dec 26, 2010
Messages
2,642
Reactions
1,920
MR
46.102
Call me! Call me! Chat with me via Yahoo Messenger Follow me on Facebook Chat with me via Teams
Bị lỗi timezone mà fix hoài ko song mong các bác chỉ giao
[27-Sep-2018 14:50:00 UTC] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. user.php on line 55

file user.php dong 55 ".date('m/d/Y h:i:s a', time())

file config mình đạt
"timezone"=>"America/New_York",

Mong mọi người chỉ giáo
date_default_timezone_set('Asia/Ho_Chi_Minh');
 
date_default_timezone_set('Asia/Ho_Chi_Minh');
đã làm như bác mà vẫn thế này
[28-Sep-2018 15:48:16 UTC] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/payadsco/public_html/100mail.info/tmail/user.php on line 55
 
You probably need to put the timezone in a configuration line in your php.ini file. You should have a block like this in your php.ini file:

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/New_York
If not, add it (replacing the timezone by yours). After configuring, make sure to restart httpd (service httpd restart).

Link stackoverflow: https://stackoverflow.com/questions...safe-to-rely-on-the-systems-timezone-settings
Mình dùng hosting bác ơi, mình đã chèn date.timezone = America/New_York vào file php.ini rồi, mà vẫn như thế, file log 1 ngày nạng cả chục M , chả biét làm sao, ngày nào cũng xoá
 

Announcements

Today's birthdays

Forum statistics

Threads
434,231
Messages
7,317,743
Members
185,672
Latest member
dewwblack
Back
Top Bottom