Hi,
You don't give the time zone but this is probably due to the clock jumping
by one hour when switching to summer time. In UK this happens at 1am and on that
day there is no such thing as 01:05, etc., see eg
https://www.timeanddate.com/time/change/uk/london
In your time zone this probably happens at 2am.
Georgi Boshnakov
------------------------------
Message: 7
Date: Thu, 26 Jan 2017 11:02:06 +0100
From: rob vech <rob.vech87 at gmail.com>
To: r-devel at r-project.org
Subject: [Rd] strptime bug
Message-ID: <70325e6b-6d54-8172-3915-bbfc8d5cd837 at gmail.com>
Content-Type: text/plain; charset="UTF-8"
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]]
------------------------------
Subject: Digest Footer
_______________________________________________
R-devel at r-project.org mailing list DIGESTED
https://stat.ethz.ch/mailman/listinfo/r-devel
------------------------------
End of R-devel Digest, Vol 167, Issue 23