Skip to content

Commit

Permalink
Other dates
Browse files Browse the repository at this point in the history
  • Loading branch information
jlaurens committed Jun 26, 2024
1 parent b9bf710 commit f477915
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
local oldyear = math.tointeger(year - 1)
if string.match(content,"%(C%)%s*" .. oldyear .. " The LaTeX Project") then
content = string.gsub(content,
Expand Down
15 changes: 8 additions & 7 deletions l3build-zip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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("<c4I2I2I2I2I2I4I4I4I2I2",
Expand Down

0 comments on commit f477915

Please sign in to comment.