title: How to round a time?
body: <p>I have a vector of hours.
  For example:</p>
  
  <pre><code>vec.hours &lt;- c("15:52:00", "15:56:00", "12:10:00", "15:12:00",  "11:49:00" ,"13:35:00", "14:53:00")
  </code></pre>
  
  <p>I would like to round the hours to get the new hours that will be the nearest whole 5 minutes,
  like this.</p>
  
  <pre><code>round.hours &lt;- c("15:50:00", "16:00:00", "12:10:00", "15:10:00",  "11:50:00" ,"13:35:00", "14:55:00" )
  </code></pre>
  
  <p>I tried this </p>
  
  <pre><code>hour &lt;- strptime(vec.hours , "%H:%M:%S")
  round.hour &lt;- round(hour , "mins")
  </code></pre>
  
  <p>But it isn't working.</p>
  
  <p>After for each round.hours I want to do +/- one hour, for example like this:</p>
  
  <pre><code>hour.rd &lt;- strptime(round.hours[1] , "%H:%M:%S")
  hourM &lt;- hour.rd - 3600
  hourP &lt;- hour.rd + 3600
  l.tm &lt;- timeSequence(from = hourM, to = hourP,format = "%H-%S-%M",by="5 min",FinCenter = "Europe/Zurich")
  </code></pre>
  
  <p>so, for 15:50:00 I have a vector of times from 14:50 until 16:50.</p>
  
  <p>I dont know how to get round.hour from vec.hours.</p>
  
  <p>Many thanks </p>