มีปัญหา time zone กับการเขียน php

กระทู้คำถาม
รบกวนวิธีแก้หน่อยครับผมนั่งแก้มา 2 วันแล้ว ร้องไห้

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 D:\AppServ\www\PHP\library\cart-functions.php on line 229



ข้างล่างนี้คือโค๊ดบรรทัดที่แจ้ง error

function deleteAbandonedCart()
{
    $yesterday = date('Y-m-d H:i:s', mktime(0,0,0, date('m'), date('d') - 1, date('Y')));         <!--บรรทัดนี้คือบรรทัดที่ 229-->
    $sql = "DELETE FROM tbl_cart
            WHERE ct_date < '$yesterday'";
    dbQuery($sql);        
}

ขอบคุณครับ ร้องไห้
คำตอบที่ได้รับเลือกจากเจ้าของกระทู้
ความคิดเห็นที่ 2
ใส่ date_default_timezone_set("Asia/Bangkok"); ไว้บนสุดของไฟล์ php
แสดงความคิดเห็น
โปรดศึกษาและยอมรับนโยบายข้อมูลส่วนบุคคลก่อนเริ่มใช้งาน อ่านเพิ่มเติมได้ที่นี่