Skip to content

as_datetime returns POSIXlt #713

Description

@adfi

I ran into a problem when using as_datetime in combination with dplyr::mutate. The latter doesn't accept POSIXlt which was being returned by as_datetime. However looking into the documentation there is no mention of POSIXlt. The documentation states: "These are drop in replacements for as.Date() and as.POSIXct()".

So is the documentation incomplete or should the function be changed?

Example:
library(lubridate)
class(as_datetime("2018-09-05 09:41:31", format="%Y-%m-%d %H:%M:%S"))
[1] "POSIXlt" "POSIXt"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviorwipwork in progress

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions