采取UTC时间戳(整数)并仅用PHP的年,月和日解析它的最佳方法是什么?谢谢
解决方法:
使用PHP date()函数.
<?php
$timestamp = strtotime("2011-9-12 05:48:00");
$year = date('Y', $timestamp);
$month = date('m', $timestamp);
$day = date('d', $timestamp);
$newTimestamp = mktime(0, 0, 0, $month, $day, $year);