diff --git a/CHANGELOG.md b/CHANGELOG.md index 776df18..8618540 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ this project uses date-based 'snapshot' version identifiers. ### Fixed - Global `typesetopts` no longer ignored for `luatex` and `lualatex` (issue \#351) +- 'UT' timestamps in zip archives are now in UTC ## [2024-05-27] diff --git a/build.lua b/build.lua index ea4bd1f..fd0e881 100644 --- a/build.lua +++ b/build.lua @@ -50,7 +50,7 @@ function update_tag(file,content,tagname,tagdate) local iso = "%d%d%d%d%-%d%d%-%d%d" local url = "https://github.com/latex3/l3build/compare/" -- update copyright - local year = os.date("%Y") + local year = os.date("%Y") -- in local TZ local oldyear = math.tointeger(year - 1) if string.match(content,"%(C%)%s*" .. oldyear .. " The LaTeX Project") then content = string.gsub(content, diff --git a/l3build-tagging.lua b/l3build-tagging.lua index 0753123..9757625 100644 --- a/l3build-tagging.lua +++ b/l3build-tagging.lua @@ -62,7 +62,7 @@ local function update_file_tag(file,tagname,tagdate) end function tag(tagnames) - local tagdate = options["date"] or os_date("%Y-%m-%d") + local tagdate = options["date"] or os_date("%Y-%m-%d") -- in local TZ local tagname = nil if tagnames then tagname = tagnames[1] diff --git a/l3build-zip.lua b/l3build-zip.lua index 5107415..824bcf6 100644 --- a/l3build-zip.lua +++ b/l3build-zip.lua @@ -22,18 +22,19 @@ for those people who are interested. --]] -local concat = table.concat -local open = io.open -local osdate = os.date -local pack = string.pack +local concat = table.concat +local open = io.open +local os_date = os.date +local os_time = os.time +local pack = string.pack local setmetatable = setmetatable -local iotype = io.type +local iotype = io.type local compress = zlib.compress local crc32 = zlib.crc32 local function encode_time(unix) - local t = osdate('*t', unix) + local t = os_date('!*t', unix) local date = t.day | (t.month << 5) | ((t.year-1980) << 9) local time = (t.sec//2) | (t.min << 5) | (t.hour << 11) return date, time @@ -75,7 +76,7 @@ local meta = {__index = { if #compressed >= #content then compressed = nil end - local timestamp = os.time() + local timestamp = os_time() local date, time = encode_time(timestamp) local central_extra, local_extra = extra_timestamp(timestamp, nil, nil) z.f:write(pack("