Feat: Support ISO 8601 timestamp with offset (#124)
Fixes timezone offset support to date parsing from Gitlab as specified by the ISO 8601 format
This commit is contained in:
@@ -205,6 +205,10 @@ describe("utils/init.lua", function()
|
||||
{ "2016-11-22T1:25:09.482Z", "-0500", "11/21/2016 at 20:25" },
|
||||
{ "2016-11-22T1:25:09.482Z", "-0000", "11/22/2016 at 01:25" },
|
||||
{ "2017-3-22T13:25:09.482Z", "+0700", "03/22/2017 at 20:25" },
|
||||
{ "2023-10-28T11:25:09.482-05:00", "-0500", "10/28/2023 at 11:25" },
|
||||
{ "2016-11-21T20:25:09.482-05:00", "-0500", "11/21/2016 at 20:25" },
|
||||
{ "2016-11-22T1:25:09.482-00:00", "-0000", "11/22/2016 at 01:25" },
|
||||
{ "2017-3-22T20:25:09.482+07:00", "+0700", "03/22/2017 at 20:25" },
|
||||
}
|
||||
for _, val in ipairs(tests) do
|
||||
local got = u.format_to_local(val[1], val[2])
|
||||
|
||||
Reference in New Issue
Block a user