You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as.Date.POSIXct() does not respect the tzone attribute of the POSIXct
object, so the Date is a UTC date. Convert to POSIXlt first, because
as.Date.POSIXlt() does use the timezone and therefore returns a local
date.
See #53, see #277.
Conflicts in R/toperiod.R related to:
- #53 time-based to Date-based index causes duplicate index values)
- #277 to.daily producing duplicates
Conflicts in R/xts.methods.R related to:
- #193 time-of-day subset performance
Fixes#245.
Submitted by: Joshua Ulrich
Assigned to: Jeff Ryan
R-Forge link
From an email exchange with Garrett See:
I think going from time-based to date-based is common practice and should be supported. However, I probably don't fully appreciate the problem.
Perhaps a better illustration is
to.daily()
which already returns an object indexed by Date, but that object has anindexTZ
:Followups:
Date: 2013-02-24 03:38
Sender: Jeff Ryan
Note that this is really an R issue, though one that I would of course like to mask with xts.
.drop.time
should probably use theformat()
approach to assure the avoidance of Dates in R as converted fromPOSIXct
.Date: 2013-03-02 17:43
Sender: Garrett See
Would it suffice to have
to.period
just provide the timezone when converting the index to Date.?The text was updated successfully, but these errors were encountered: