9 lines
167 B
Bash
9 lines
167 B
Bash
|
#!/usr/bin/env bash
|
||
|
[ -n "$TOPDIR" ] && cd $TOPDIR
|
||
|
if [ "$1" == "-id" ]; then
|
||
|
REV=`date "+%s"`
|
||
|
echo "$REV"
|
||
|
else
|
||
|
date -d "$(($1 -`date '+%s'`)) sec " +%y-%-m-%-d
|
||
|
fi
|