Skip to content
Prev 7262 / 63424 Next

strptime mysteriously adds a day - 0S-specific: Linux and Windows (so far) (PR#1466)

On Thu, 18 Apr 2002, Martin Maechler wrote:

            
The issue is that an unspecified year is assumed *by the IS* to be 1900, a
leap year. I'm not sure why glibc does this when the tm_year field is not
being set, but it confidently says this is day 101 of the year, and that's
the result you get.

The only portable workaround is to give the year: there is (at least in
R-devel) a warning in the help file about this.