Page 1 of 1

How to set server time?

PostPosted: 27. December 2010 12:02
by Sindy
Hi,

this is the php code that i used to insert data to sql database
$Fname = $_POST["Fname"];
$Lname = $_POST["Lname"];
$gender = $_POST["gender"];
$sql="INSERT INTO $tbl_name(firstname, lastname, gender, datetime)VALUES('$Fname', '$Lname','$gender', NOW() )";

when i submit data to database, the datetime data will be auto insert into datetime field. However, the date time is not same with my country time.
eg, data insert into database is (2010-12-25 15:21:36) , but it should be (2010-12-25 23:22:36)
after that, i realized that the datetime value is based on server time

How to change the server time of xampp 1.7.3

Appreciate your help ....thanks...

Re: How to set server time?

PostPosted: 02. January 2011 11:08
by NiAlMa
have you set date.timezone in der php.ini correct?

Re: How to set server time?

PostPosted: 04. January 2011 02:53
by Sindy
thanks 4 reply...

im beginner of xampp. So, i not sure whether i set it correct or not.......

may i know how do check or set date.timezone in der php.ini ?

for you information, im from Malaysia.......

Re: How to set server time?

PostPosted: 04. January 2011 03:17
by Altrea
In your XAMPP Backend is a link to a phpinfo() function.
In this report search for "Default timezone" and "date.timezone"