27.10.2020, 08:32
Change eventlog function to replace day names. Keep in mind that this will only work for newly events after the function has been modified.
Code:
function eventlog(text)
local max = 1000 -- max number of entries
-- add formatted date
local date = os.date('%a %d/%m/%Y %T ')
date = date:gsub('%a+', {
Mon = 'lun.',
Tue = 'mar.',
Wed = 'mer.',
Thu = 'gio.',
Fri = 'ven.',
Sat = 'sab.',
Sun = 'dom.',
})
storage.exec('lpush', 'eventlog', date .. text)
storage.exec('ltrim', 'eventlog', 0, max - 1)
end