[Rd] strptime bug
rob vech
rob.vech87 at gmail.com
Thu Jan 26 11:02:06 CET 2017
Dear developer list,
I want to submit the following problem that seems like a bug, as
confirmed by an other user [1], related to date-time parsing:
Here a simple script:
# that works:
as.numeric(as.POSIXlt(strptime('2016-03-27 01:05:50', format='%Y-%m-%d
%H:%M:%S')))
# that not (it returns NA):
as.numeric(as.POSIXlt(strptime('2016-03-27 02:05:50', format='%Y-%m-%d
%H:%M:%S')))
# it works again
as.numeric(as.POSIXlt(strptime('2016-03-27 03:05:50', format='%Y-%m-%d
%H:%M:%S')))
I made several test and the problem seems to be related to the couple
"2016-03-27" as date and "2" as hour. It seems not to be related to the
datetime format.
There is a similar bug on bugzilla [2] but in my case I cannot replicate it.
My OS is Win 7 and R v3.3.2.
Thank you
rob
[1] https://stat.ethz.ch/pipermail/r-help/2017-January/444468.html
[2] https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16764
[[alternative HTML version deleted]]
More information about the R-devel
mailing list