From: Felix Fietkau Date: Mon, 1 Feb 2016 10:33:15 +0000 (+0000) Subject: scripts/portable_date.sh: fix parsing of date strings on non-GNU systems X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=64ec9dc2a12d978dad0ffb2a508eb6a526c8f1e2;p=openwrt%2Fstaging%2Faparcar.git scripts/portable_date.sh: fix parsing of date strings on non-GNU systems Signed-off-by: Felix Fietkau SVN-Revision: 48592 --- diff --git a/scripts/portable_date.sh b/scripts/portable_date.sh index 84a18eb621..244f545a25 100755 --- a/scripts/portable_date.sh +++ b/scripts/portable_date.sh @@ -2,10 +2,10 @@ case $(uname) in NetBSD|OpenBSD|DragonFly|FreeBSD|Darwin) - date -r $1 $2 + date -j -f "%Y-%m-%d %H:%M:%S %z" "$1" "$2" 2>/dev/null ;; *) - date -d @$1 $2 + date -d "@$1" "$2" esac exit $?