x <- timeBasedSeq('2010-01-01/2010-01-02 12:00')
x <- xts(seq_along(x), x)
y <- timeBasedSeq('2010-01-01/2010-01-03 12:00/H')
y <- xts(seq_along(y), y, tzone = "America/New_York")
# Changing the tclass does not change the internal index values, but it
# does change how the index is printed!
head(y) # the index has times
.index(y)
tclass(y) <- "Date"
head(y) # the index prints without times, but
.index(y) # the internal index is not changed!
Run the code above in your browser using DataLab