[Xts-commits] r772 - pkg/xts/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Apr 25 03:01:39 CEST 2013
Author: bodanker
Date: 2013-04-25 03:01:39 +0200 (Thu, 25 Apr 2013)
New Revision: 772
Modified:
pkg/xts/R/toperiod.R
Log:
- patch to.period bug (#2691, #2710), thanks to Garrett See
Modified: pkg/xts/R/toperiod.R
===================================================================
--- pkg/xts/R/toperiod.R 2013-04-21 16:36:44 UTC (rev 771)
+++ pkg/xts/R/toperiod.R 2013-04-25 01:01:39 UTC (rev 772)
@@ -80,7 +80,7 @@
if(indexAt=="yearmon" || indexAt=="yearqtr")
indexClass(xx) <- indexAt
if(indexAt=="firstof") {
- ix <- as.POSIXlt(c(.index(xx)))
+ ix <- as.POSIXlt(c(.index(xx)), tz=indexTZ(xx))
if(period %in% c("years","months","quarters","days"))
index(xx) <- firstof(ix$year + 1900, ix$mon + 1)
else
@@ -88,7 +88,7 @@
ix$hour, ix$min, ix$sec)
}
if(indexAt=="lastof") {
- ix <- as.POSIXlt(c(.index(xx)))
+ ix <- as.POSIXlt(c(.index(xx)), tz=indexTZ(xx))
if(period %in% c("years","months","quarters","days"))
index(xx) <- as.Date(lastof(ix$year + 1900, ix$mon + 1))
else
More information about the Xts-commits
mailing list