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

as_datetime("2017-01-20") returns NA, breaks compatibility #597

Closed
mmitkevich opened this Issue Oct 31, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@mmitkevich

mmitkevich commented Oct 31, 2017

Hi, latest as_datetime doesn't parse ISO time string any more.

> lubridate::as_datetime("2017-01-20")
[1] NA
Warning message:
All formats failed to parse. No formats found. 

I had to insert old implementation

setMethod("as_datetime", "character",
          function(x, tz = "UTC") {
            with_tz(as.POSIXct(x), tzone = tz)
          })

into my code to revert to old semantics. It breaked my code.

Why shouldn't as_datetime parse dates without time as midnights?

@vspinu

This comment has been minimized.

Member

vspinu commented Oct 31, 2017

Hm. This breaking change slipped my radar. Consequence of #536 and #527. We want a consistent behavior of all of the parsing code. Will fix in a moment.

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