-- Returns a day before today at 00:00 as unix seconds
local function yesterday_midnight()
- local piecewise_time = os.date("!*t")
+ local piecewise_time = os.date("*t")
piecewise_time.day = piecewise_time.day - 1 -- Lua allows negative values here
piecewise_time.hour = 0
piecewise_time.sec = 0
-- Returns today time at 00:00 as unix seconds
local function today_midnight()
- local piecewise_time = os.date("!*t")
+ local piecewise_time = os.date("*t")
piecewise_time.hour = 0
piecewise_time.sec = 0
piecewise_time.min = 0
if not opts.date or #opts.date == 0 then
opts.date = {}
- table.insert(opts.date, os.date('!%Y%m%d', yesterday_midnight()))
+ table.insert(opts.date, os.date('%Y%m%d', yesterday_midnight()))
end
local ndates = 0
end
-- Prepare and send redis report element
- local period = os.date('!%Y%m%d',
- task:get_date({format = 'connect', gmt = true}))
+ local period = os.date('%Y%m%d',
+ task:get_date({format = 'connect', gmt = false}))
-- Dmarc domain key must include dmarc domain, rua and period
local dmarc_domain_key = table.concat(