From 811980dfe42f3feb63f19ba45def015c36637ef8 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sat, 15 Jun 2019 23:22:45 -0400 Subject: ob_rfc822_mktime(): Fix parsing --- 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)) -- cgit v0.9.1