Datestring↔Timestampの変換はdateコマンドでやることが多いのだが、
Linux系OSとMacOSそれぞれのbashの方言の違いにハマったのでメモ。
GNU (e.g. Linux OS)
# To Timestamp
date -d "2008-10-1 12:34" +%s
# To Datestring
date --date "@1104505200"
BSD (e.g. Mac OS)
# To Timestamp
date -r "1104505200"
# To Datestring
date -j -f "%Y-%m-%d" "2010-10-02" "+%s"