When I try to convert a date with a year, month and day information of class Date to POSIXct, I get a result consisting also of hours, minutes,etc but the hour is set to "01". I think this is related to the locale which is set to Europe (LC_TIME=fr_FR.UTF-8) and the default timezone is CET.
The example can be duplicated using the chunk of code below:
Sys.Date() # "2019-01-24" : This gives back a Date class object
as.POSIXct(Sys.Date()) # "2019-01-24 01:00:00 CET": This gives back a POSIXct
I would like to get a "00" hour when converting to POSIXct and to understand what's really going. Is there a way to accomplish this without using lubridate?
Thanks!