title: Postgresql round timestamp to nearest 30 seconds
body: <p>is possible in postgres to round timestamp to nearest 30 seconds?
  For example:</p>
  
  <pre><code>source -&gt; result
  
  2017-06-07 14:11:20 -&gt; 2017-06-07 14:11:00
  2017-06-07 14:11:40 -&gt; 2017-06-07 14:11:30
  2017-06-07 14:12:10 -&gt; 2017-06-07 14:12:00
  </code></pre>