[latex3-commits] [latex3/l3build] main: Apply -utc switch for LuaTeX when using a fixed epoch value (9255356)

github at latex-project.org github at latex-project.org
Tue Sep 5 14:28:59 CEST 2023


Repository : https://github.com/latex3/l3build
On branch  : main
Link       : https://github.com/latex3/l3build/commit/9255356d907adcea1f0bebcf19954a562c453b47

>---------------------------------------------------------------

commit 9255356d907adcea1f0bebcf19954a562c453b47
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Tue Sep 5 13:28:59 2023 +0100

    Apply -utc switch for LuaTeX when using a fixed epoch value


>---------------------------------------------------------------

9255356d907adcea1f0bebcf19954a562c453b47
 CHANGELOG.md            |  1 +
 l3build.lua             | 11 +++++++++++
 testfiles/00-test-1.lvt |  4 +++-
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index fa8ae9d..c825844 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ this project uses date-based 'snapshot' version identifiers.
 ### Changed
 - Initialise the random seed with the current time so `--shuffle` produces different orders each run.
 - Normalise more `luaotfload` cache lines
+- Apply `-utc` switch for LuaTeX when using a fixed epoch value
 
 ## [2023-07-20]
 
diff --git a/l3build.lua b/l3build.lua
index ffabdcc..553cfe6 100644
--- a/l3build.lua
+++ b/l3build.lua
@@ -117,6 +117,17 @@ if options["epoch"] then
   forcedocepoch   = true
 end
 epoch = normalise_epoch(epoch)
+-- LuaTeX needs the `-utc` option
+if next(specialformats) and next(specialformats.latex)
+  and next (specialformats.latex.luatex) then
+  local options = specialformats.latex.luatex.options
+  specialformats.latex.luatex.options = (options and (options .. " ") or "") .. "-utc"
+end
+if next(specialformats) and next(specialformats["latex-dev"])
+  and next (specialformats["latex-dev"].luatex) then
+  local options = specialformats["latex-dev"].luatex.options
+  specialformats["latex-dev"].luatex.options = (options and (options .. " ") or "") .. "-utc"
+end
 
 --
 -- Deal with multiple configs for tests
diff --git a/testfiles/00-test-1.lvt b/testfiles/00-test-1.lvt
index f641cbf..77fda7c 100644
--- a/testfiles/00-test-1.lvt
+++ b/testfiles/00-test-1.lvt
@@ -42,5 +42,7 @@
   \ASSERT{Q}{\ODD}%
   \ASSERTSTR{Q}{\ODD}%
 }
-
+\ExplSyntaxOn
+\TEST{Oops}{\show\c_sys_timestamp_str}
+\ExplSyntaxOff
 \end{document}





More information about the latex3-commits mailing list.