tidyverse / lubridate

Make working with dates in R just that little bit easier
https://lubridate.tidyverse.org
GNU General Public License v3.0
724 stars 207 forks source link

Parsing midnight on Windows #1123

Closed tristanfabregas closed 1 year ago

tristanfabregas commented 1 year ago

Date time doesn't return the hourly part at midnight on Windows since I've update R to version 4.3.0 (2023-04-21 ucrt): Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 11 x64 (build 22621)

time_midnight <- lubridate::ymd_hms("2010-12-13 00:00:00")
time_midnight
#> [1] "2010-12-13 UTC"

I have a similar problem with vroom when I load a *.csv from the disk, but here the datetime is replaced with NA. Has anyone else experienced the same problem? I haven't tried it on macOS or linux though.

Thank you

vspinu commented 1 year ago

It's there, it's just not printed :) Whenever you see "UTC" or other time zone it means it's a POSIXt object and not a Date.