diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/portable_date.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/portable_date.sh b/scripts/portable_date.sh new file mode 100755 index 0000000000..84a18eb621 --- /dev/null +++ b/scripts/portable_date.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +case $(uname) in + NetBSD|OpenBSD|DragonFly|FreeBSD|Darwin) + date -r $1 $2 + ;; + *) + date -d @$1 $2 +esac + +exit $? |