1
0
Fork 0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-05-28 02:16:14 +02:00
openwrt/scripts/portable_date.sh
Jo-Philipp Wich 78e5e56201 scripts: fix GNU data invocation
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 48594
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 $?