summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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))