CODE 1
<?php
ini_set('date.timezone', 'Asia/Kuala_Lumpur');
$today = Date('y.m.d H:i:s'); // current time
echo $today;
?>
CODE 2
<?php
ini_set('date.timezone', 'Asia/Kuala_Lumpur');
$today = Date('y.m.d H:i:s'); // current time
$query= "UPDATE items SET post_date = '{$today}' WHERE item_name='$item_name'";
mysql_query($query);
?>
hi all, as you all can see, i have two similar code above,for the first one, it run well and i get what i want. But for the second code, when i trying to save the time into my database, it show the wrong time
let say if i run it now, the correct output is 11.04.09 16:35:13
however after i update it into database ,it show 11.04.09 01:35:13
so may i know how should i set the database type?
im using timestamp now.
thank you