greyscalepress / manifestos

Manifestos for the Internet Age
Other
159 stars 16 forks source link

new timestamp function not working on OSX #25

Closed ms-studio closed 8 years ago

ms-studio commented 8 years ago

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.