Timestamp to ISO 8601 in Lua
date-conversion, iso8601, lua, nginx, timestamp
Solution
Try `os.date("!%Y-%m-%dT%TZ")` or `os.date("!%Y-%m-%dT%TZ",t)` if `t` has the date in seconds since the epoch.
Problem
How would you convert a timestamp to an ISO 8601 format (such as `2009-01-28T21:49:59.000Z`) in Lua? I'm specifically trying to do it by using the HttpLuaModule in Nginx.