summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2014-07-16 07:24:13 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2014-07-16 07:26:27 +0200
commit1fdc7b6792199cfc37bdb43948b82523a8b8f91a (patch)
tree9cf866b6d7dabcef649ad666daa947e505cd56f1 /src
parentaf51fb74b7fbcbe01790309a117b5991277a5dd1 (diff)
downloadluaotfload-1fdc7b6792199cfc37bdb43948b82523a8b8f91a.tar.gz
[log,db] fix options to os.date() on non-posix systems
Fixes https://github.com/lualatex/luaotfload/issues/233 On non-POSIX systems, the Lua interpeter is compiled with a reduced set of options accepted by ``os.date()`` [0]. [0] http://www.lua.org/source/5.2/loslib.c.html#LUA_STRFTIMEOPTIONS
Diffstat (limited to 'src')
-rw-r--r--src/luaotfload-database.lua2
-rw-r--r--src/luaotfload-log.lua6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/luaotfload-database.lua b/src/luaotfload-database.lua
index 7a01ca6..4c5522e 100644
--- a/src/luaotfload-database.lua
+++ b/src/luaotfload-database.lua
@@ -357,7 +357,7 @@ mtx-fonts has in names.tma:
--- string list -> string option -> dbobj
local initialize_namedata = function (formats, created)
- local now = os.date "%F %T"
+ local now = os.date "%Y-%m-%d %H:%M:%S" --- i. e. "%F %T" on POSIX systems
return {
--families = { },
status = { }, -- was: status; map abspath -> mapping
diff --git a/src/luaotfload-log.lua b/src/luaotfload-log.lua
index 5698c84..a0e78bd 100644
--- a/src/luaotfload-log.lua
+++ b/src/luaotfload-log.lua
@@ -91,7 +91,8 @@ local set_logout = function (s, finalizers)
logout = "redirect"
local chan = choose_logfile ()
chan:write (stringformat ("logging initiated at %s",
- osdate ("%F %T", ostime ())))
+ osdate ("%Y-%m-%d %h:%m:%s", --- i. e. osdate "%F %T"
+ ostime ())))
local writefile = function (...)
if select ("#", ...) == 2 then
chan:write (select (2, ...))
@@ -117,7 +118,8 @@ local set_logout = function (s, finalizers)
finalizers[#finalizers+1] = function ()
chan:write (stringformat ("\nlogging finished at %s\n",
- osdate ("%F %T", ostime ())))
+ osdate ("%Y-%m-%d %h:%m:%s", --- i. e. osdate "%F %T"
+ ostime ())))
chan:close ()
texiowrite = texio.write
texiowrite_nl = texio.write_nl