X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=scripts%2Fportable_date.sh;h=244f545a257a6c1a426b7e6b56c617d65129fd2e;hb=85354aeadba1a0916daa2b08c3ca00889af58f2e;hp=84a18eb62190549404c86f1082ac571fa035f8b0;hpb=5df6ea611e100f8aa7c8f42724af2c28bc251a39;p=openwrt-working-2016%2F.git 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 $?