跳至主要內容

時間戳轉換為 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