title: Why isn't indexTZ() working and changing the time?
body: <p>I have an xts object with timezone in "GMT", from what I've seen throughout this website I can use <code>indexTZ()</code> to change the time zone. I have tried every trick possible, first specifying "GMT" then changing it to "IST". Specifying "IST" when I first convert the timestamps to Date Time format: <code>DF$DateTime= as.POSIXct(DF$DateTime/(10^9), origin="1970-01-01", tz = "IST")</code> but it still gives me time in "GMT". Basically, nothing happens. </p>
  
  <pre><code>&gt; head(auro)
                                 MP       avgVWAP TradePressure Modify
  2015-11-30 03:45:01  0.0000000000  0.0000117703            37    107
  2015-11-30 03:45:02  0.0016475976  0.0004038842            11     30
  2015-11-30 03:45:03  0.0007009310  0.0013219980            13     34
  2015-11-30 03:45:04 -0.0003656419 -0.0002547382            11      0
  2015-11-30 03:45:05 -0.0004572404 -0.0003604543             4      0
  2015-11-30 03:45:06  0.0005486634  0.0003343666             7    -14
  Warning message:
  timezone of object (GMT) is different than current timezone (IST). 
  &gt; indexTZ(auro)&lt;- "IST"
  &gt; head(auro)
                                 MP       avgVWAP TradePressure Modify
  2015-11-30 03:45:01  0.0000000000  0.0000117703            37    107
  2015-11-30 03:45:02  0.0016475976  0.0004038842            11     30
  2015-11-30 03:45:03  0.0007009310  0.0013219980            13     34
  2015-11-30 03:45:04 -0.0003656419 -0.0002547382            11      0
  2015-11-30 03:45:05 -0.0004572404 -0.0003604543             4      0
  2015-11-30 03:45:06  0.0005486634  0.0003343666             7    -14
  &gt; indexTZ(auro)&lt;- "UTC"
  &gt; head(auro)
                                 MP       avgVWAP TradePressure Modify
  2015-11-30 03:45:01  0.0000000000  0.0000117703            37    107
  2015-11-30 03:45:02  0.0016475976  0.0004038842            11     30
  2015-11-30 03:45:03  0.0007009310  0.0013219980            13     34
  2015-11-30 03:45:04 -0.0003656419 -0.0002547382            11      0
  2015-11-30 03:45:05 -0.0004572404 -0.0003604543             4      0
  2015-11-30 03:45:06  0.0005486634  0.0003343666             7    -14
  Warning message:
  timezone of object (UTC) is different than current timezone (IST). 
  </code></pre>
  
  <p>I noticed there is a disconnect between my time and time zone. Time is in "GMT" but the time zone displayed is in "IST"</p>
  
  <pre><code>&gt; Sys.time()
  [1] "2016-03-23 06:49:00.816 IST"
  </code></pre>
  
  <p>So I thought changing system time zone first might help, but it doesn't. Again, nothing happens. </p>
  
  <pre><code>&gt; Sys.setenv(TZ = "GMT")
  &gt; Sys.time()
  [1] "2016-03-23 06:51:31.044 GMT"
  &gt; indexTZ(auro)&lt;- "IST"
  &gt; head(auro)
                                 MP       avgVWAP TradePressure Modify
  2015-11-30 03:45:01  0.0000000000  0.0000117703            37    107
  2015-11-30 03:45:02  0.0016475976  0.0004038842            11     30
  2015-11-30 03:45:03  0.0007009310  0.0013219980            13     34
  2015-11-30 03:45:04 -0.0003656419 -0.0002547382            11      0
  2015-11-30 03:45:05 -0.0004572404 -0.0003604543             4      0
  2015-11-30 03:45:06  0.0005486634  0.0003343666             7    -14
  Warning message:
  timezone of object (IST) is different than current timezone (GMT). 
  </code></pre>
  
  <p>Any idea why this is happening? </p>
  
  <p>Does <code>indexTZ()</code> or <code>Sys.setenv()</code> just change timezone and not calibrate time to the time zone specified?</p>
  
  <p>If thats the case then, what can I do to change the time and time zone of my xts object?</p>
  
  <p>Am I doing something wrong? </p>