跳到主要内容

时间戳转换为 RFC 3339 格式文本 (utils.date_to_rfc3339)

声明​

rfc3339 = utils.date_to_rfc3339(timestamp)

参数​

  • timestamp 数值型,时间戳

返回值​

  • rfc3339 文本型,RFC 3339 格式的时间文本

说明​

这个函数在 20250220 以后版本方可使用

示例​

nLog(utils.date_to_rfc3339(1749490800)) -- 输出:2025-06-09T17:40:00.000Z  
nLog(utils.date_to_rfc3339(os.time())) -- 输出类似:2025-06-09T17:40:00.000Z