请问下面的函数如何转换成yyyy年-mm月-dd日 hh时:nn分:ss秒.zzz毫秒

1405648098520,这个时间戳已经精确到毫秒
请问php代码是什么

网上找的,你看看你能不能用
/** 获取当前时间戳,精确到毫秒 */
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}

/** 格式化时间戳,精确到毫秒,x代表毫秒 */
function microtime_format($tag, $time)
{
list($usec, $sec) = explode(".", $time);
$date = date($tag,$usec);
return str_replace('x', $sec, $date);
}

使用方法:
1. 获取当前时间戳(精确到毫秒):microtime_float()
2. 时间戳转换时间:microtime_format('Y年m月d日 H时i分s秒 x毫秒', 1270626578.66000000)
温馨提示:答案为网友推荐,仅供参考