несоответствий Lua 5.1 док говорит: '!'Lua UTC время
Если формат начинается с, то дата форматируется в координированных Universal Time.
Если формат %c
, !
'поведение s кажется правильным
local date_1 = os.date("!%c")
local date_2 = os.date("%c")
print("utc date: "..date_1)
print("not utc date: "..date_2)
Если формат *t
, !
' поведение s кажется местами
local time_1 = os.time(os.date("!*t"))
local time_2 = os.time(os.date("*t"))
print("should be utc time, but is not: "..time_1) -- this should be UTC, and is not
print("should not be utc time, but is: "..time_2) -- this should not be UTC, but is
Даты испытываются: http://www.epochconverter.com/
Почему?