Here's my code:
last_date <- "Tue, 26 Jun 2018 08:58:10 -0700 (PDT)"
as.Date(as.POSIXct(last_date, format = "%a, %d %b %Y %H:%M:%S %z"))
The result is
[1] NA
Version information:
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 5.0
year 2018
month 04
day 23
svn rev 74626
language R
version.string R version 3.5.0 (2018-04-23)
nickname Joy in Playing
When I try the same code on another computer (R version 3.4.0), the result is, as expected,
[1] "2018-06-26"
Any idea on how to solve this? Thanks.