openwrt/scripts/portable_date.sh

12 lines
126 B
Bash
Executable File

#!/bin/sh
case $(uname) in
NetBSD|OpenBSD|DragonFly|FreeBSD|Darwin)
date -r $1 $2
;;
*)
date -d @$1 $2
esac
exit $?