title: How can I set a cron job with yesterday's date in Solaris?
body: <p>I want to set a cron job with yesterday's date on a Unix server (Solaris). I tried:</p>
  
  <pre><code>TZ=CST+24 date +%Y%m%d
  </code></pre>
  
  <p>but got</p>
  
  <pre><code>had TZ=CST+24: not found
  </code></pre>
  
  <p>I tried</p>
  
  <pre><code>`perl -mPOSIX -e 'print POSIX::strftime("%Y%m%d",localtime(time() - 86400)) '`
  </code></pre>
  
  <p>This works but I’m not sure that all the clients have Perl on their machines.</p>
  
  <p><code>date -v</code> and <code>date -d</code> don't work; only the <code>-u</code> and <code>-a</code> options work with date in Unix:</p>
  
  <pre><code>date: illegal option -- d
  usage: date [-u] mmddHHMM[[cc]yy][.SS]
  date [-u] [+format]
  date -a [-]sss[.fff]
  </code></pre>
  
  <p>How can I do this?</p>