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

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

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

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

mmitkevich opened this issue Oct 31, 2017 · 1 comment

Comments

@mmitkevich
Copy link

@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
Copy link
Member

@vspinu 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants