X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=scripts%2Fportable_date.sh;h=84b56382e0af941a9b2b8e73457839d4600d9341;hb=e10d12411c607a4ff5fa206b9120954235fcc881;hp=84a18eb62190549404c86f1082ac571fa035f8b0;hpb=2f14514a12f708fecbe786e028fb9e3c542907da;p=openwrt%2Fopenwrt.git diff --git a/scripts/portable_date.sh b/scripts/portable_date.sh index 84a18eb621..84b56382e0 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 $?