title: Change xts object date indexing
body: <p>I have two data files with stock returns. I'm trying to apply the same function to both but I get an error for one of them. I wanted to find out what's causing the error, so I compared the output of <code>str</code> for both xts objects and the only line that differs is:</p>
  
  <pre><code>Indexed by objects of class: [POSIXct,POSIXt] TZ: # this object errors
  Indexed by objects of class: [Date] TZ: GMT       # this object works
  </code></pre>
  
  <p>Is there a way to change the indexing of the dates in an xts object so that the output of <code>str</code> returns: <code>Indexed by objects of class: [Date] TZ: GMT</code>?</p>
  
  <p>I generated the dates using: <code>seq(as.Date("1963/07/01"), as.Date("2004/12/01"), by = "1 month",tzone="GMT")</code>.</p>
  
  <p>A reproducible example:</p>
  
  <pre><code>library(xts)
  library("PerformanceAnalytics")
  load("https://dl.dropboxusercontent.com/u/22681355/data.Rdata")
  data(edhec)
  data2 &lt;- as.xts(french1)
  </code></pre>
  
  <p>The function I want to call is <code>Return.portfolio()</code> with the argument <code>rebalance_on="months"</code></p>
  
  <pre><code>Return.portfolio(edhec["1997",1:10],rebalance_on="months") #this works
  Return.portfolio(data2["1976",1:10],rebalance_on="months") #this does not work
  </code></pre>