title: How to change to 24 hour format in datatables in R Shiny
body: <p>Just like most people, time date format is also not my favorite topic in R, and is once again giving me more trouble than I bargained for. </p>
  
  <p>In follow-up of this question: <a href="https://stackoverflow.com/questions/45651789/changing-time-and-dateformat-to-show-correct-format-on-shiny-dashboard">SO</a></p>
  
  <p>I got rid of the 'T' and 'Z' with <code>'toLocaleString'</code>but now my  <code>datatable</code> is showing times in AM and PM, while I just want to see the original 24h times. </p>
  
  <p>I'm running the app in google chrome, and my output looks like this at the moment: </p>
  
  <p><a href="https://i.stack.imgur.com/lYHUu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lYHUu.png" alt="enter image description here"></a></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")
  
    tz &lt;- Sys.timezone()                                                                                                    
    data$DATUM &lt;- as.POSIXct(as.character(data$DATUM), tz=tz)
  
    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>