title: Change the legend's timestamp format in R dygraphs
body: <p>I'm charting a time series with <code>dygraphs</code> in <code>R</code> like the following:</p>
  
  <pre><code>library(dygraphs)
  library(htmlwidgets)
  library(data.table)
  
  now &lt;- Sys.time()
  dataset &lt;- data.table(time = as.POSIXct(now+1:10),value = 1:10)
  d &lt;- dygraph(dataset) 
  </code></pre>
  
  <p>The date format displayed in the legend depends in the machine locale and I cannot leave it fixed.</p>
  
  <p>The labels of the x axis can be formatted as follows:</p>
  
  <pre><code>valueFormatter&lt;-"function formatValue (ms) {
                  return ms.toISOString();
  }"
  
  d &lt;- d%&gt;%dyAxis("x", axisLabelFormatter=JS(valueFormatter))
  </code></pre>
  
  <p>However, I don't know how to do it for the legend.</p>