For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /reference/sdk/sapi/runtime/functions/formatTimestamp.md.
  • 简体中文
  • Function: formatTimestamp()

    function formatTimestamp(ts: number): string;

    Defined in: sapi/runtime/tools.ts:219

    将给定的 Unix 毫秒时间戳格式化为东八区标准的 YYYY-MM-DD HH:mm 字符串。

    Parameters

    ParameterTypeDescription
    tsnumberUnix 毫秒时间戳。

    Returns

    string

    格式化后的时间字符串。