diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-02-01 10:33:15 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-02-01 10:33:15 +0000 |
commit | 64ec9dc2a12d978dad0ffb2a508eb6a526c8f1e2 (patch) | |
tree | a946ed36b39d98137872d90dcee86650d71c6e62 | |
parent | d9fab8760714b364c286bc37fc0de1d4006b29ff (diff) | |
download | upstream-64ec9dc2a12d978dad0ffb2a508eb6a526c8f1e2.tar.gz upstream-64ec9dc2a12d978dad0ffb2a508eb6a526c8f1e2.tar.bz2 upstream-64ec9dc2a12d978dad0ffb2a508eb6a526c8f1e2.zip |
scripts/portable_date.sh: fix parsing of date strings on non-GNU systems
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 48592
-rwxr-xr-x | scripts/portable_date.sh | 4 |
1 files changed, 2 insertions, 2 deletions
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 $? |