aboutsummaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/date.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/widgets/date.lua b/widgets/date.lua
index b20e43f..d3c6ce9 100644
--- a/widgets/date.lua
+++ b/widgets/date.lua
@@ -5,8 +5,11 @@
---------------------------------------------------
-- {{{ Grab environment
-local os = { date = os.date }
local setmetatable = setmetatable
+local os = {
+ date = os.date,
+ time = os.time
+}
-- }}}
@@ -16,7 +19,7 @@ module("vicious.widgets.date")
-- {{{ Date widget type
local function worker(format, warg)
- return os.date(format or nil, warg or nil)
+ return os.date(format or nil, warg and os.time()+warg or nil)
end
-- }}}