2 -- ion/mod_statusbar/ion-statusd/statusd_date.lua
4 -- Copyright (c) Tuomo Valkonen 2004-2009.
6 -- See the included file LICENSE for details.
13 date_format='%a %Y-%m-%d %H:%M',
17 local settings=table.join(statusd.get_config('date'), defaults)
19 local function update()
21 statusd.inform('date', os.date(settings.date_format, tm))
22 for k, f in pairs(settings.formats) do
23 statusd.inform('date_'..k, os.date(f, tm))
28 local function timer_handler(tmr)
31 local t=os.date('*t', tm)
32 local d=(60-t.sec)*1000
34 timer:set(d, timer_handler)
37 timer=statusd.create_timer()