aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2012-08-28 05:12:25 +0500
committerWaqas Hussain <waqas20@gmail.com>2012-08-28 05:12:25 +0500
commitd8b4fe0fe877a3ff855ac141242f5d1637e5202b (patch)
tree8276e610e9afb045b26716a266354d71af71d50a
parentcdd56ed7e4bf4ecf35f69fe95beba4e2b3bafc5d (diff)
parent8df019952cf1e5d32832af1a8bf007d4408c2864 (diff)
downloadprosody-d8b4fe0fe877a3ff855ac141242f5d1637e5202b.tar.gz
prosody-d8b4fe0fe877a3ff855ac141242f5d1637e5202b.zip
Merge 0.9->trunk
-rw-r--r--util/datetime.lua2
1 files changed, 1 insertions, 1 deletions
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;