zendframework/zf2 — pull request #2059 by heiglandreas (2012-07-31 12:30:49+00:00)
Title: Fixes failing DateStepTest on 31. after July

This fixes a strange issue that occures in UnitTests for DateStepTests
on a 31st of August, October or December.

The DataSet 22 of the stepTestsDataProvider contains a format-string for
the DateTime::createFromFormat. DateTime::createFromFormat() will
interpret the given date as January 1970. Due to the fact that the
formating string does not contain an exclamation mark all other values
will be inserted from the current datetime.

So on running the tests on the 6th of March the date will be set to '06'
instead of the expected '01'. THat does not make a difference. It does
make a difference though on the 31st of a month when the target month
for the comparison is September or November as these do not have 31
days. Therefore the created DateTime-Object references the first of the
following month. Therefore a diff now does not contain only a month, but
a month and one day. And therefore the test fails.

The test now uses an exclamation mark and therefore is "padded" with
"01"