lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

In Lua 5.1, when you have a non-UTC timezone (e.g. set TZ="EST+9")
When you run: `"!%s")` it will give you a timestamp doubly-adjusted for your time zone.

    $ lua5.1 <<< 'print("!%s",1234567890))'

This seems to be an unfortunate side effect of how %s is specified:
> The number of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). (TZ)

This isn't an issue in Lua 5.2, as does not include "s"