From c303033e21ea428d13a11f361a0f44526447dcfa Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Mon, 24 Mar 2014 23:37:50 +0200 Subject: model: accept epoch offset when assigning timestamp value --- aconf/model/time.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'aconf/model') diff --git a/aconf/model/time.lua b/aconf/model/time.lua index ca6008d..099a819 100644 --- a/aconf/model/time.lua +++ b/aconf/model/time.lua @@ -25,6 +25,7 @@ M.Timestamp.format = M.Date.format..' '..M.Time.format function M.Timestamp:_offset(value) if not value then return end + if type(value) == 'number' then return value end local time = posix.strptime(value, self.format) return time and os.time(time) end -- cgit v1.2.3