title: Date conversion from POSIXct to Date in R
body: <p>can anyone tell me why R give such outcome below:</p>
  
  <pre><code>&gt; as.POSIXct("2013-01-01 08:00")
  [1] "2013-01-01 08:00:00 HKT"
  &gt; as.Date(as.POSIXct("2013-01-01 08:00"))
  [1] "2013-01-01"
  &gt; as.POSIXct("2013-01-01 07:00")
  [1] "2013-01-01 07:00:00 HKT"
  &gt; as.Date(as.POSIXct("2013-01-01 07:00"))
  [1] "2012-12-31"
  </code></pre>
  
  <p>Shouldn't it be <code>2013-01-01</code> after converting <code>POSIXct</code> to <code>Date</code> for <code>2013-01-01 07:00</code>, is there any way to change the cutoff from <code>08:00</code> to <code>00:00</code>?</p>
  
  <h3>Update #1</h3>
  
  <p>I found the following can fix my problem, but in a less neat way</p>
  
  <pre><code>&gt; as.Date(as.character(as.POSIXct("2013-01-01 07:00")))
  [1] "2013-01-01"
  </code></pre>