projects
/
openwrt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7893b3
)
scripts/portable_date.sh: fix parsing of date strings on non-GNU systems
author
nbd
<nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 1 Feb 2016 10:33:15 +0000
(10:33 +0000)
committer
nbd
<nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Mon, 1 Feb 2016 10:33:15 +0000
(10:33 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48592
3c298f89
-4303-0410-b956-
a3cf2f4a3e73
scripts/portable_date.sh
patch
|
blob
|
history
diff --git
a/scripts/portable_date.sh
b/scripts/portable_date.sh
index
84a18eb
..
244f545
100755
(executable)
--- 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 $?