This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

ISO 8601
#2
Try this:
Code:
function iso_8601_timestamp()
    local now, nowms = os.microtime()
    local ms = math.round(nowms / 1000, 0)
    return os.date("!%Y-%m-%dT%T", now) .. "." .. ms .. "Z"
end

stamp = iso_8601_timestamp()

log(stamp)
Reply


Messages In This Thread
ISO 8601 - by tomnord - 12.11.2023, 09:00
RE: ISO 8601 - by Erwin van der Zwart - 12.11.2023, 13:08
RE: ISO 8601 - by tomnord - 12.11.2023, 17:16

Forum Jump: