new timestamp function not working on OSX
ms-studio opened this issue · 0 comments
ms-studio commented
A new "human readable" date format was introduced in
The former version was:
TIMESTAMP=$(date +"%s")
The new version:
TIMESTAMP=$(date --utc +%Y%m%d_%H%M%SZ)
This produces the following error on OSX:
date: illegal option -- -
usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ...
[-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
The notation -u
appears to work fine though, and according to http://ss64.com/bash/date.html has the same result.