23) { return $gtm0 + 86400 + $offset * 3600 * - 1; } else { return $gtm0 + $offset * 3600 * - 1; } } /** * get the timestamp at current hour start * @param int $num 指定时间 * @return number */ public static function getHourTimestamp($now = null) { $now = $now === null ? time() : $now; $diff = $now % 3600; // 1 * 60 * 60; return $now - $diff; } /** * get the timestamp at current minute start * @param int $num 指定时间 * @return number */ public static function getMinuteTimestamp($now = null) { $now = $now === null ? time() : $now; $diff = $now % 60; return $now - $diff; } }