I can't figure out why the following line of R script works perfectly fine on Windows (7, 64bit with R 3.0.2 64bit) but not on Linux (3.12.1-1-ARCH GNU/Linux 64bit with R 3.0.2 64bit):
Windows:
>strptime("2013-05-08 10:27:50", format="%Y-%m-%d %H:%M:%S")
>[1] "2013-05-08 10:27:50"
Linux:
> strptime("2013-05-08 10:27:50", format="%Y-%m-%d %H:%M:%S")
>NA
There is some reference to "LC_TIME locale category" in the description of strptime
but I really don't know if this is relevant to my problem.
Could somebody please explain, why the same line of code leads to different results and how I can make the Linux version of R behave the way of the Windows version?
Copyright Notice:Content Author:「Richard Kolodziej」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/20175641/converting-character-in-date-time-format-posixct-works-on-windows-not-linux