From acf5a8a4416e2f26edad4c28a235a77da9b62baf Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Sun, 28 Aug 2016 21:57:38 -0700 Subject: [PATCH] shlib.sh: use parse_any_date instead of parse_rfc2822_date The config_get_date_seconds function turns a date into seconds since the epoch. Change it to use parse_any_date (which supports RFC 2822 dates) instead of parse_rfc2822_date so that it can convert more time formats. Signed-off-by: Kyle J. McKay --- shlib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shlib.sh b/shlib.sh index fda0d65..fc9f1ce 100644 --- a/shlib.sh +++ b/shlib.sh @@ -382,7 +382,7 @@ config_set_raw() { config_get_date_seconds() { _dt="$(config_get "$1" || :)" [ -n "$_dt" ] || return 1 - _ds="$(perl -I@basedir@ -MGirocco::Util -e "print parse_rfc2822_date('$_dt')")" + _ds="$(perl -I@basedir@ -MGirocco::Util -e "print parse_any_date('$_dt')")" [ -n "$_ds" ] || return 1 echo "$_ds" } -- 2.11.4.GIT