title: convert Linux date to yyyy-MM-dd'T'HH:mm:ss'Z' format
body: <p>I need to parameter-ize a datetime value with an objective of passing to a constructed URI to make a Smartsheet API call to get data (i.e. sheets) changed in last 24 hours.</p>
  
  <p>I want to use Linux <code>date</code> command as I can do something like <code>date -d '1 day ago' %F</code> to get the output of a day before today.  How can I use the date command to convert the value to <code>yyyy-MM-dd'T'HH:mm:ss'Z'</code> format to get something like <code>2018-01-01T00:00:00-07:00</code>? </p>
  
  <p>If the value is not in this particular format, then Smartsheet API complains:</p>
  
  <pre><code>HTTP_01 - Error fetching resource. Status: 400 Reason: 
  Bad Request : { "errorCode" : 1018, "message" : "The value '/home/my/path/to/param_file/Sysdate' was not valid for the parameter modifiedSince.", "refId" : "1xqawd3s94f4y" }
  </code></pre>
  
  <p>Thanks,</p>