1
0
mirror of https://github.com/merbanan/openwrt.git synced 2025-11-10 21:16:02 +00:00
Files
merbanan_openwrt/scripts/portable_date.sh
Jo-Philipp Wich 9e998f0970 scripts: fix GNU data invocation
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48594 3c298f89-4303-0410-b956-a3cf2f4a3e73
2016-02-01 10:43:27 +00:00

12 lines
171 B
Bash
Executable File

#!/bin/sh
case $(uname) in
NetBSD|OpenBSD|DragonFly|FreeBSD|Darwin)
date -j -f "%Y-%m-%d %H:%M:%S %z" "$1" "$2" 2>/dev/null
;;
*)
date -d "$1" "$2"
esac
exit $?