หน้า 1 จากทั้งหมด 1

ใช้ function getdate Strict Standards: getdate() [function.getdate]:

โพสต์แล้ว: 02/01/2012 10:58 pm
โดย nat9999
ใช้ function getdate

43 $today = getdate();
44 $today1 = getdate(strtotime("+1 days"));
45 $today2 = getdate(strtotime("+2 days"));

run บน appserv (http://localhost/) แล้วขึ้นข้อความ

Strict Standards: getdate() [function.getdate]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'Asia/Krasnoyarsk' for '7.0/no DST' instead in C:\AppServ\www\travel\index.php on line 43

Strict Standards: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'Asia/Krasnoyarsk' for '7.0/no DST' instead in C:\AppServ\www\travel\index.php on line 44

Strict Standards: getdate() [function.getdate]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'Asia/Krasnoyarsk' for '7.0/no DST' instead in C:\AppServ\www\travel\index.php on line 44

Strict Standards: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'Asia/Krasnoyarsk' for '7.0/no DST' instead in C:\AppServ\www\travel\index.php on line 45

Strict Standards: getdate() [function.getdate]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'Asia/Krasnoyarsk' for '7.0/no DST' instead in C:\AppServ\www\travel\index.php on line 45

ต้องแก้ไขอย่างไรครับ

มือใหม่หัดเขียน php

ณัฐ

Re: ใช้ function getdate Strict Standards: getdate() [function.getdate]:

โพสต์แล้ว: 03/01/2012 10:34 am
โดย mindphp
ใช้ php เวอร์ชั่นอะไร

เข้าไปแก้ที่ php.ini ครับ แก้เป็น

ตั้งค่า
date.timezone
หรือยัง

Re: ใช้ function getdate Strict Standards: getdate() [function.getdate]:

โพสต์แล้ว: 03/01/2012 11:55 am
โดย nat9999
ขอบคุณมากครับ

Re: ใช้ function getdate Strict Standards: getdate() [function.getdate]:

โพสต์แล้ว: 18/12/2019 12:42 pm
โดย mindphp
เข้าไปแก้ที่ php.ini ครับ แก้เป็น

[Date]
; Defines the default timezone used by the date functions
date.timezone = Asia/Bangkok