Tag Archives: lua

lua & timezones by name

A bit hard to puzzle due to scarce documentation. #!/usr/bin/env lua local luatz = require ‚luatz‘ — https://github.com/daurnimator/luatz/   local tz_name = ‚Europe/Berlin‘ local ts_loc = luatz.time({year=2014, month=12, day=31, hour=23, min=59})   — %z isn’t supported yet: https://github.com/daurnimator/luatz/blob/523b2e0f1ece77c569f6db4c040886ed3124512e/luatz/strftime.lua#L178 local function tz_off_iso8601(tz_offset_seconds) local separator = “ — 8601 %z compliant — separator = ‚:‘ — 8601 […]