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

ตอบกระทู้

รูปแสดงอารมณ์
:icon_plusone: :like: :plusone: :gfb: :-D :) :( :-o 8O :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: :angry: :baa: :biggrin:
รูปแสดงอารมณ์อื่นๆ

BBCode เปิด
[img] เปิด
[url] เปิด
[Smile icon] เปิด

กระทู้แนะนำ
   

มุมมองที่ขยายได้ กระทู้แนะนำ: ใช้ function getdate Strict Standards: getdate() [function.getdate]:

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

โดย mindphp » 18/12/2019 12:42 pm

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

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

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

โดย nat9999 » 03/01/2012 11:55 am

ขอบคุณมากครับ

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

โดย mindphp » 03/01/2012 10:34 am

ใช้ php เวอร์ชั่นอะไร

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

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

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

โดย nat9999 » 02/01/2012 10:58 pm

ใช้ 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

ณัฐ

ข้างบน