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

rbind_list() / rbind_all() do not propagate timezone information for POSIXct #298

Closed
ateucher opened this issue Mar 3, 2014 · 2 comments
Closed
Assignees
Labels
Milestone

Comments

@ateucher
Copy link
Contributor

@ateucher ateucher commented Mar 3, 2014

Similar to #252 and #265:

dates1 <- data.frame(ID=c("a", "b", "c"), 
                     dates=structure(c(-247320000, -246196800, -245073600), 
                                     tzone = "GMT",
                                     class = c("POSIXct", "POSIXt")), 
                     stringsAsFactors=FALSE)

dates2 <- data.frame(ID=c("d", "e", "f"), 
                     dates=structure(c(-243864000, -242654400, -241444800), 
                                     tzone = "GMT",
                                     class = c("POSIXct", "POSIXt")), 
                     stringsAsFactors=FALSE)

sapply(list(dates1$dates, dates2$dates), attr, "tz")
# [1] "GMT" "GMT"

alldates <- rbind_list(dates1, dates2)

attr(alldates$dates, "tz")
# NULL

Cheers,
Andy

@hadley hadley added the bug label Mar 17, 2014
@hadley hadley added this to the v0.2 milestone Mar 17, 2014
@romainfrancois
Copy link
Member

@romainfrancois romainfrancois commented Mar 24, 2014

I've handled the case where all tzone are the same. When not, I'm just considering that results are not compatible. Maybe instead we should align times against the first time zone when there are several involved.

Loading

@hadley
Copy link
Member

@hadley hadley commented Mar 24, 2014

That's already better than R which IIRC simply drops all time zones except the first.

Loading

@lock lock bot locked as resolved and limited conversation to collaborators Jun 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants