Ich habe schon von dem Problem gelesen, dass bei der Konvertierung von 2.0.x nach phpBB3 RC1 die Geburtstage ohne führendes *blank in der neuen phpbb3_users generiert werden.
Dieses Problem habe ich nicht - dafür ein anderes.
Zunächst mal werden bei mir auch keine Geburtstage vor dem 01.01.1970 übernommen. Das könnte ich ja noch in der functions_phpbb20.php durch das Entfernen der Prüfung auf "< 0" beheben.
Nun wird bei mir jedoch ein Geburtstag, der im alten Forum in der phpbb_users in der Spalte user_birthday mit dem Wert 1890 (also 06.03.1975 TT.MM.JJJJ) drinsteht in die neue phpbb3_users nach user_birthday mit dem Wert "3- 6-1975" übernommen. Das wird dann aber nicht als 6. März sondern als 3. Juni interpretiert.
Bei einem anderen User wird der Wert 2546 (= 21.12.1976) übernommen mit "12-21-1976". Als Tag wird im Profil dann 12, als Monat "--" angezeigt.
Ich konvertiere von 2.0.23 nach 3.0.4
Hier der betreffende Code aus meiner functions_phpbb20.php
Code: Alles auswählen
/**
* Convert Birthday from Birthday MOD to phpBB Format
*/
function phpbb_get_birthday($birthday = '')
{
if (defined('MOD_BIRTHDAY_TERRA'))
{
$birthday = (string) $birthday;
// stored as month, day, year
if (!$birthday)
{
return ' 0- 0- 0';
}
// We use the original mod code to retrieve the birthday (not ideal)
preg_match('/(..)(..)(....)/', sprintf('%08d', $birthday), $birthday_parts);
$month = $birthday_parts[1];
$day = $birthday_parts[2];
$year = $birthday_parts[3];
return sprintf('%2d-%2d-%4d', $day, $month, $year);
}
else
{
$birthday = (int) $birthday;
if (!$birthday || $birthday == 999999 || ((version_compare(PHP_VERSION, '5.1.0') < 0) && $birthday < 0))
{
return ' 0- 0- 0';
}
// The birthday mod from niels is using this code to transform to day/month/year
return sprintf('%2d-%2d-%4d', gmdate('n', $birthday * 86400 + 1), gmdate('j', $birthday * 86400 + 1), gmdate('Y', $birthday * 86400 + 1));
}
}
Viele Grüße,
Jens