From 8df019952cf1e5d32832af1a8bf007d4408c2864 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Tue, 28 Aug 2012 05:08:18 +0500 Subject: util.datetime: Fix timestamp parsing pattern. --- util/datetime.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/datetime.lua b/util/datetime.lua index c73d8e76..a1f62a48 100644 --- a/util/datetime.lua +++ b/util/datetime.lua @@ -36,7 +36,7 @@ end function parse(s) if s then local year, month, day, hour, min, sec, tzd; - year, month, day, hour, min, sec, tzd = s:match("^(%d%d%d%d)-?(%d%d)-?(%d%d)T(%d%d):(%d%d):(%d%d)%.?%d*([Z+%-].*)$"); + year, month, day, hour, min, sec, tzd = s:match("^(%d%d%d%d)%-?(%d%d)%-?(%d%d)T(%d%d):(%d%d):(%d%d)%.?%d*([Z+%-]?.*)$"); if year then local time_offset = os_difftime(os_time(os_date("*t")), os_time(os_date("!*t"))); -- to deal with local timezone local tzd_offset = 0; -- cgit v1.2.3