Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R-Forge #5891] .index* functions do not account for different TZ #3

Closed
joshuaulrich opened this issue Feb 26, 2015 · 0 comments
Closed
Assignees
Labels

Comments

@joshuaulrich
Copy link
Owner

Submitted by: Joshua Ulrich
Assigned to: Joshua Ulrich
R-Forge link

For example:

R> x <- xts(, as.Date('2013-03-17'))
R> as.POSIXlt(.POSIXct(.index(x)))$wday
[1] 6
R> as.POSIXlt(.POSIXct(.index(x), tz=indexTZ(x)))$wday
[1] 0

R> Sys.setenv(TZ='America/Chicago')
R> x <- xts(, as.POSIXct('2013-03-17', ))
R> x <- xts(, as.POSIXct('2013-03-17', tz='America/New_York'))
R> as.POSIXlt(.POSIXct(.index(x)))$wday
[1] 6
R> as.POSIXlt(.POSIXct(.index(x), tz=indexTZ(x)))$wday
[1] 0

Followups:

Date: 2014-09-05 13:12
Sender: Joshua Ulrich
Fixed in r844. Thanks to Garrett See for the report and patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant