title: write.csv : Error in charToDate(x) : character string is not in a standard unambiguous format
body: <p>I am trying to write to disc a <code>data.table</code> with the following structure:</p>
  
  <pre>
  Classes ‘data.table’ and 'data.frame':  408776 obs. of  13 variables:
   $ date     : IDate, format: "2013-02-01" "2013-02-01" "2013-02-01" "2013-02-01" ...
   $ hour     : int  1 1 1 1 1 1 2 2 2 2 ...
   $ time     :Class 'ITime'  int [1:408776] 16 186 218 229 463 474 16 186 208 218 ...
   $ bids_med : num  NA NA NA 2.1 2.1 4.6 NA 7.5 7.5 7.5 ...
   $ bids_n   : int  NA NA NA 2 2 2 NA 4 4 4 ...
   $ asks_med : num  NA NA NA 21.5 21.5 21.5 NA 21 21 21 ...
   $ asks_n   : int  NA NA NA 2 2 2 NA 5 5 5 ...
   $ bprice   : num  5 4.2 4.2 4.2 5 5 9 9 9 10 ...
   $ bqty     : int  19 10 10 10 5 5 25 25 50 20 ...
   $ aprice   : num  16 16 21 21 21 21 19 19 19 19 ...
   $ aqty     : int  25 6 50 50 50 50 50 50 50 50 ...
   $ lastprice: num  7 16 16 16 16 16 9 9 9 9 ...
   $ lastqty  : int  31 19 6 6 6 6 25 25 25 25 ...
   - attr(*, "sorted")= chr  "date" "hour" "time"
   - attr(*, ".internal.selfref")= 
  </pre>
  
  <p>and I am getting the following error:</p>
  
  <pre>
  > write.csv("data/probit.csv", training, row.names = FALSE)
  Error in charToDate(x) : 
    character string is not in a standard unambiguous format
  </pre>
  
  <p>To reproduce:</p>
  
  <pre>
  structure(list(date = structure(c(15737L, 15737L, 15737L, 15737L, 
  15737L, 15737L), class = c("IDate", "Date")), hour = c(1L, 1L, 
  1L, 1L, 1L, 1L), time = structure(c(16L, 186L, 218L, 229L, 463L, 
  474L), class = "ITime"), bids_med = c(NA, NA, NA, 2.1, 2.1, 4.6
  ), bids_n = c(NA, NA, NA, 2L, 2L, 2L), asks_med = c(NA, NA, NA, 
  21.5, 21.5, 21.5), asks_n = c(NA, NA, NA, 2L, 2L, 2L), bprice = c(5, 
  4.2, 4.2, 4.2, 5, 5), bqty = c(19L, 10L, 10L, 10L, 5L, 5L), aprice = c(16, 
  16, 21, 21, 21, 21), aqty = c(25L, 6L, 50L, 50L, 50L, 50L), lastprice = c(7, 
  16, 16, 16, 16, 16), lastqty = c(31L, 19L, 6L, 6L, 6L, 6L)), .Names = c("date", 
  "hour", "time", "bids_med", "bids_n", "asks_med", "asks_n", "bprice", 
  "bqty", "aprice", "aqty", "lastprice", "lastqty"), sorted = c("date", 
  "hour", "time"), class = c("data.table", "data.frame"), row.names = c(NA, 
  -6L))
  </pre>
  
  <p>I am quite lost what to do with it. Any suggestions what might help? Thx.</p>