This is no bug, but strptime
expects the information in a standardised way. %p
is:
AM/PM indicator in the locale. Used in conjunction with ‘%I’ and not with ‘%H’. An empty string in some locales.
In you locale this is defined as AM/am
and PM/pm
. R is a formal language, and you need to stick to the rules it imposes. If you define a factor with levels flavor
, color
, taste
, you cannot expect to be able to use colour
and flavour
as ways to refer to this factor. Even though it seems obvious to you that these represent the same concept, R is a formal language without human flexibility.