Hi All,
I moved my server and SQL database and now getting errors showing timestamp
old server the time stamp
format was 20050316134117
with `time_stamp` timestamp(14) NOT NULL
and the new server has 2006-04-21 15:27:11
with `time_stamp` timestamp NULL default CURRENT_TIMESTAMP,
the script I am using is
instead of showing the result as
April 21st, 2006 at 03:27 pm
all the results show
Dec 04th, 2005 at 09:01 pm
Please suggest what changes I should make in the script
I moved my server and SQL database and now getting errors showing timestamp
old server the time stamp
format was 20050316134117
with `time_stamp` timestamp(14) NOT NULL
and the new server has 2006-04-21 15:27:11
with `time_stamp` timestamp NULL default CURRENT_TIMESTAMP,
the script I am using is
Code:
$time_stamp = stripslashes($cats[time_stamp]);
$year = substr($time_stamp, 0, 4);
$month = substr($time_stamp, 4, 2);
$day = substr($time_stamp, 6, 2);
$hour = substr($time_stamp, 8, 2);
$min = substr($time_stamp, 10, 2);
$t = mktime($hour, $min, 0, $month, $day, $year);
$date = date('M d\t\h\, Y \a\t h\:i a', $t);
April 21st, 2006 at 03:27 pm
all the results show
Dec 04th, 2005 at 09:01 pm
Please suggest what changes I should make in the script