Skip to content

Commit

Permalink
Revert "Fix failure of test..xts_tzone"
Browse files Browse the repository at this point in the history
This reverts commit 9f74e20.
  • Loading branch information
TomAndrews committed Jul 26, 2018
1 parent 993434a commit 2917a21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions R/xts.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function(x=NULL,
`.xts` <-
function(x=NULL, index, tclass=c("POSIXct","POSIXt"),
tzone=Sys.getenv("TZ"),
check=TRUE, unique=FALSE, .indexCLASS=tclass, .indexTZ=tzone, ...) {
check=TRUE, unique=FALSE, .indexCLASS=tclass, ...) {
if(check) {
if( !isOrdered(index, increasing=TRUE, strictly=unique) )
stop('index is not in ',ifelse(unique, 'strictly', ''),' increasing order')
Expand Down Expand Up @@ -141,7 +141,7 @@ function(x=NULL, index, tclass=c("POSIXct","POSIXt"),

## restore behaviour from v0.10-2
tclass <- .indexCLASS
xx <- .Call("add_xtsCoreAttributes", x, index, .indexCLASS, .indexTZ, tzone, tclass,
xx <- .Call("add_xtsCoreAttributes", x, index, .indexCLASS, tzone, tclass,
c('xts','zoo'), .indexFORMAT, PACKAGE='xts')
# remove .indexFORMAT and .indexTZ that come through Ops.xts
dots.names$.indexFORMAT <- dots.names$.indexTZ <- NULL
Expand Down
4 changes: 2 additions & 2 deletions src/attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ SEXP ca (SEXP x, SEXP y)
return R_NilValue;
}

SEXP add_xtsCoreAttributes(SEXP _x, SEXP _index, SEXP _indexClass, SEXP _indexTZ, SEXP _tzone,
SEXP add_xtsCoreAttributes(SEXP _x, SEXP _index, SEXP _indexClass, SEXP _tzone,
SEXP _tclass, SEXP _class, SEXP _indexFormat)
{
int P=0;
Expand All @@ -195,7 +195,7 @@ SEXP add_xtsCoreAttributes(SEXP _x, SEXP _index, SEXP _indexClass, SEXP _indexTZ
}
setAttrib(_x, xts_IndexSymbol, _index); /* index */
setAttrib(_x, xts_IndexClassSymbol, _indexClass); /* .indexClass */
setAttrib(_x, xts_IndexTZSymbol, _indexTZ); /* .indexTZ */
setAttrib(_x, xts_IndexTZSymbol, _tzone); /* .indexTZ */
setAttrib(_x, xts_IndexTclassSymbol, _tclass); /* tclass */
setAttrib(_x, xts_IndexTzoneSymbol, _tzone); /* tzone */
setAttrib(_x, R_ClassSymbol, _class); /* class */
Expand Down

0 comments on commit 2917a21

Please sign in to comment.