Why not use DateTime? The code you want is something like this:
function my_datestring($timestamp, $timezone = "Asia/Shanghai", $format = "Y-m-d h:i:s") {
$dt = new DateTime();
$dt->setTimezone(new DateTimeZone($timezone));
$dt->setTimestamp($timestamp);
return $dt->format($format);
}
$timestamp = **********;
echo my_datestring($timestamp, "Europe/Paris");
Hope, this will help you.