跳到主要内容

时间戳转换为 RFC 1123 格式文本 (utils.date_to_rfc1123)

声明

rfc1123 = utils.date_to_rfc1123(timestamp)

参数

  • timestamp
    数值型,时间戳

返回值

  • rfc1123
    文本型,RFC 1123 格式的时间文本

说明

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

示例

nLog(utils.date_to_rfc1123(1749490800)) -- 输出:Mon, 09 Jun 2025 17:40:00 GMT  
nLog(utils.date_to_rfc1123(os.time())) -- 输出类似:Mon, 09 Jun 2025 17:40:00 GMT