Page 1 of 1

time in database in different with my current time

Posted: Sun Nov 09, 2008 8:23 am
by chxxangie

Code: Select all

 
$upload_date = date('y-m-d'); 
$upload_time = date('G:i:s');
 
when i check from database, i found that the time which is stored into database in not correct.

the time in database is like below:-
2008-11-09 08:31:09 (database data)
2008-11-09 4:34 PM (my pc time)

how to show the time in correctly?

Re: time in database in different with my current time

Posted: Sun Nov 09, 2008 12:18 pm
by JAB Creations
I always found this completely obnoxious. Place this after your database handler...

Code: Select all

mysql_query("SET time_zone = '-4:00';");