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
commit59ea05542830dd9ed4bcda623e05e3ebbd2b3633 (patch)
tree8276e610e9afb045b26716a266354d71af71d50a
parent1cda3e3bd186eea68a8b12e6fc3d7a93aeb929b5 (diff)
parentf79f756a448351c3b4d9250f8c6247d1c0cfa629 (diff)
downloadprosody-59ea05542830dd9ed4bcda623e05e3ebbd2b3633.tar.gz
prosody-59ea05542830dd9ed4bcda623e05e3ebbd2b3633.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;