summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-06-15 23:22:45 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-06-15 23:22:45 (EDT)
commit811980dfe42f3feb63f19ba45def015c36637ef8 (patch)
tree863f7746943295471604f2830cf0e0ceaaada471 /lib
parent314de454f5d59d3a04f21bd28dd412b60c11db1e (diff)
ob_rfc822_mktime(): Fix parsing
Diffstat (limited to 'lib')
-rw-r--r--lib/time.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/time.sh b/lib/time.sh
index b65bbba..23b88ad 100644
--- a/lib/time.sh
+++ b/lib/time.sh
@@ -99,17 +99,21 @@ ob_rfc822_mktime()
local mday=
local mon=
local year=
+ local time=
+ local tz=
local hour=
local min=
local sec=
- local tz=
local tzsgn=
local tzhour=
local tzmin=
- read wday mday mon year hour min sec tz <<-EOF
+ read wday mday mon year time tz <<-EOF
${rfc822_tm}
EOF
+ IFS=':' read hour min sec <<-EOF
+ ${time}
+ EOF
tzsgn="${tz%%[0-9]*}"; tz=${tz#[+-]}; tz=${tz#0}; tz=${tz#0}
tzhour=$((${tz} / 100))
tzmin=$(( ${tz} % 100))