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

สำหรับผู้ที่ เริ่มต้น Programming - PHP มีอะไร แนะนำ หรือข้อสงสัยต้องบอร์ด นี้ คนที่มีความรู้ แบ่งปันคนอื่นบ้างนะ ปัญหาการเขียนโปรแกรม แบบ OOP Session Cookies php network

Moderator: mindphp, ผู้ดูแลกระดาน

nat9999
PHP Newbie
PHP Newbie
โพสต์: 4
ลงทะเบียนเมื่อ: 02/01/2012 10:49 pm

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

โพสต์ที่ยังไม่ได้อ่าน โดย 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

ณัฐ
ภาพประจำตัวสมาชิก
mindphp
ผู้ดูแลระบบ MindPHP
ผู้ดูแลระบบ MindPHP
โพสต์: 41125
ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
ติดต่อ:

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

โพสต์ที่ยังไม่ได้อ่าน โดย mindphp »

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

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

ตั้งค่า
date.timezone
หรือยัง
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
nat9999
PHP Newbie
PHP Newbie
โพสต์: 4
ลงทะเบียนเมื่อ: 02/01/2012 10:49 pm

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

โพสต์ที่ยังไม่ได้อ่าน โดย nat9999 »

ขอบคุณมากครับ
ภาพประจำตัวสมาชิก
mindphp
ผู้ดูแลระบบ MindPHP
ผู้ดูแลระบบ MindPHP
โพสต์: 41125
ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
ติดต่อ:

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

โพสต์ที่ยังไม่ได้อ่าน โดย mindphp »

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

[Date]
; Defines the default timezone used by the date functions
date.timezone = Asia/Bangkok
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ตอบกลับโพส
  • Similar Topics
    ตอบกลับ
    แสดง
    โพสต์ล่าสุด

ผู้ใช้งานขณะนี้

สมาชิกกำลังดูบอร์ดนี้: Bing [Bot], Google [Bot] และบุคลทั่วไป 62