It is useful for debugging to run this command standalone, but in
that case it typically has to set the timezone for the database to
ensure that the times in the results are the same as the PHP times.
In the GitLab CI environment, the command:
@header("Content-Type: text/plain");
Generates the Content-Type line of:
Content-Type: text/plain; charset=UTF-8
But on my workstation it generates this:
Content-Type: text/plain;charset=UTF-8
By adding that charset to our call to @header, we receive a
predictable result.
It seems PHP's date::setDate function doesn't do what we want when
you hand it a negative integer so we need to override a little more
of it's behaviour. We have to make sure that date::modify is not
called with a days greater than the month we might land in when we
add a number of months to it.