extra space was used in front of %d so that we can detect the difference between a leading 0 and something like 10, 20, or 30. The extra space was removed along with any leading 0 but not if there was no leading zero.
Now removing extra space even if there is no leading zero.
if (abs($timezone) > 13) { /// Server time
if ($fixday) {
$datestring = strftime($formatnoday, $date);
- $daystring = str_replace(' 0', '', strftime(' %d', $date));
+ $daystring = str_replace(array(' 0', ' '), '', strftime(' %d', $date));
$datestring = str_replace('DD', $daystring, $datestring);
} else {
$datestring = strftime($format, $date);