diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-02-01 13:33:15 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-02-01 13:33:15 +0300 |
commit | c603072636731aba7d1e9e20e6603619072f6295 (patch) | |
tree | 2b270cf0a2146364d1fd074d56b305a483ab1a3d /scripts | |
parent | f97b9e14204d8c62636caef9ca98c704ebdebf9b (diff) |
scripts/portable_date.sh: fix parsing of date strings on non-GNU systems
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48592 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'scripts')
-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 $? |