根据服务器时区动态打印时间

I've read many posts about the question I posted here but I'm encountering a strange issue.

I've set my PHP server timezone to "Asia/Bangkok" (just an example) using date.timezone directive in php.ini file which works quite fine.

The server returns correct time based on set time zone when I simply print the time as

<?php echo date("F j, Y, g:i A"); ?> 

But when I want to print a series of time dynamically, inputted into mysql database during user entry like,

<?php echo date("F j, Y g:i A", strtotime($row_entries['input_time']));?>

The server returns the system time based on the timezone set by host which is Europe/Dublin (just an example).

I even tried to print the time without strtotime function like,

 <?php echo date("F j, Y g:i A",($row_entries['post_time']));?>

That returns abnormal/invalid date.

What's going wrong here and how could I print time dynamically based on server time zone I set in php.ini?

It seems that this row

$row_entries['post_time']

uses MYSQL default time zone which is different

so please could you post SQL that insert data in this column ?

It is possible that your MySQL is not configured to the correct timezone. Here is a link to configure: http://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html

i'm using timestamp

1) use int to store digit or varchar for text or datetime to store date and time.
2) read about default behavior of this datatype - value will be updated when ANY other field in the record will be updated. This datatype is only should be used for logging purposes.