Fixed date bug.

Turns out the ISO-8601 dates returned by PHP's date() do not work like
I thought they did. Also fixed a PHP warning.