At some point last year, I set my birthdate to 10-27 for October 27th, and my profile was successfully updated. However, the field had been changed to 0001-10-27, giving me 2016 years (don't I look young for my third millenia?)
This in turn prevented the update of my profile on all Diaspora pods, triggering the following error as found by @jaywink : https://friendica.mrpetovan.com/display/44ab9fb2-92fd-4fb5-97ce-db32224df8c6
We should either allow a missing year in the field or strip the year from the update message to Diaspora pods if it is 0001.
We should have a look into the whole birthday functionality.
When nulldates were converted from 0000-00-00 some months ago this code was changed: (dev/src/Protocol/Diaspora:~L4120
if (($profile['dob']) && ($profile['dob'] > '0001-01-01')) {
$dob = ((intval($profile['dob'])) ? intval($profile['dob']) : '1000') .'-'. datetime_convert('UTC', 'UTC', $profile['dob'],'m-d');
}
Note the test line was converted to anything greater than 0001-01-01, but the next line checks only for the old null year of 0000 by casting the string to int using intval(). To preserve the original functionality this should probably read
if (($profile['dob']) && ($profile['dob'] > '0001-01-01')) {
$dob = ((intval($profile['dob']) > 1) ? intval($profile['dob']) : '1000') .'-'. datetime_convert('UTC', 'UTC', $profile['dob'],'m-d');
}
Most helpful comment
When nulldates were converted from 0000-00-00 some months ago this code was changed: (dev/src/Protocol/Diaspora:~L4120
if (($profile['dob']) && ($profile['dob'] > '0001-01-01')) { $dob = ((intval($profile['dob'])) ? intval($profile['dob']) : '1000') .'-'. datetime_convert('UTC', 'UTC', $profile['dob'],'m-d'); }Note the test line was converted to anything greater than 0001-01-01, but the next line checks only for the old null year of 0000 by casting the string to int using intval(). To preserve the original functionality this should probably read
if (($profile['dob']) && ($profile['dob'] > '0001-01-01')) { $dob = ((intval($profile['dob']) > 1) ? intval($profile['dob']) : '1000') .'-'. datetime_convert('UTC', 'UTC', $profile['dob'],'m-d'); }