title: Shiny/DT: column & top filter for datetime column show wrong values
body: <p>I am having bit of trouble to figure out why my <strong>column and filter</strong> for datetime column shows the wrong date and time.</p>
  
  <p>My data looks like this (<code>dput</code> <strong>is in shiny code below</strong>):</p>
  
  <pre><code>                 DATUM NUMMER
  1  2017-03-29 00:00:02     19
  2  2017-03-29 00:00:36     20
  3  2017-03-29 00:00:40     21
  4  2017-03-29 00:00:44     22
  5  2017-03-29 00:00:47     23
  6  2017-03-29 00:00:51     24
  7  2017-03-29 00:00:55     25
  8  2017-03-29 00:00:59     26
  9  2017-03-29 00:01:03     27
  10 2017-03-29 00:01:07     28
  </code></pre>
  
  <p>As we can see, it is nothing special. After displaying this data in shiny using <code>DT</code> package, the data looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/Mw77o.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Mw77o.jpg" alt="enter image description here"></a></p>
  
  <p>it is displayed with 2h difference, without any reason...</p>
  
  <p>My <strong>first approach</strong> was to check my <code>Sys.time()</code> </p>
  
  <pre><code>&gt; Sys.time()
  [1] "2017-03-30 09:09:40 CEST"
  </code></pre>
  
  <p>and it is correct, <strong>second approach</strong> was to dig into <code>DT</code> documentation, and there i have found the function: <code>formatDate(1, method = 'toLocaleString')</code>. I have used it, the display of the datetime field appeared to be good (see pic below), however the top filter still is showing the wrong datetime values...</p>
  
  <p><a href="https://i.stack.imgur.com/iaH6G.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iaH6G.jpg" alt="enter image description here"></a></p>
  
  <p><strong>Here is the reproducible example:</strong></p>
  
  <pre><code>library(shiny)
  library(DT)
  
  data &lt;- structure(list(DATUM = structure(c(1490738402, 1490738436, 1490738440, 
                                             1490738444, 1490738447, 1490738451, 1490738455, 1490738459, 1490738463, 
                                             1490738467), class = c("POSIXct", "POSIXt"), tzone = "CEST"), NUMMER = c(19, 
                                                                                                                  20, 21, 22, 23, 24, 25, 26, 27, 28)), .Names = c("DATUM", "NUMMER"
                                                                                                                  ), row.names = c(NA, 10L), class = "data.frame")
  
  ui= fluidPage(
  
        dataTableOutput("tab")
      )
  
  server= function(input, output,session) {
  
    output$tab &lt;- DT::renderDataTable({
      datatable(data,rownames=TRUE, filter="top", class = 'cell-border stripe') %&gt;%
        formatDate(1, method = 'toLocaleString')})
  
  
  }
  
  shinyApp(ui, server)
  </code></pre>
  
  <p>As we can see in the data the <code>min</code> datetime value is <code>2017-03-29 00:00:02</code>, however the top filter of <code>datatable</code> shows <code>2017-03-28T22:00:02</code>, whereas the <code>max</code> datetime value in data is: <code>2017-03-29 00:01:07</code>, the top filter shows: <code>2017-03-28T22:01:07</code>. </p>
  
  <p>I would appreciate any help and explanation, why <code>DT</code> package transforms my data and displays it with 2h difference, and why after implying the function <code>formatDate()</code>, the filter still shows wrong values.</p>
  
  <p>Thanks for help</p>