aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/convertors/functions_phpbb20.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-03-15 08:40:11 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-03-15 08:40:11 +0000
commit3adda9c1acaf673608fa00ac79f47446560d2bb7 (patch)
tree17d92681a1aae8af3fedce95c43ea12cd8805b3c /phpBB/install/convertors/functions_phpbb20.php
parent4b0439958401369367cb928e562c442a8a4273cd (diff)
downloadforums-3adda9c1acaf673608fa00ac79f47446560d2bb7.tar
forums-3adda9c1acaf673608fa00ac79f47446560d2bb7.tar.gz
forums-3adda9c1acaf673608fa00ac79f47446560d2bb7.tar.bz2
forums-3adda9c1acaf673608fa00ac79f47446560d2bb7.tar.xz
forums-3adda9c1acaf673608fa00ac79f47446560d2bb7.zip
ok, another fix to the birthday conversion. Thanks rxu for debugging this. :)
git-svn-id: file:///svn/phpbb/trunk@7199 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/install/convertors/functions_phpbb20.php')
-rw-r--r--phpBB/install/convertors/functions_phpbb20.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/phpBB/install/convertors/functions_phpbb20.php b/phpBB/install/convertors/functions_phpbb20.php
index 0f364eefde..93677201be 100644
--- a/phpBB/install/convertors/functions_phpbb20.php
+++ b/phpBB/install/convertors/functions_phpbb20.php
@@ -410,9 +410,12 @@ function phpbb_get_birthday($birthday = '')
return ' 0- 0- 0';
}
- $month = substr($birthday, 0, 2);
- $day = substr($birthday, 2, 2);
- $year = substr($birthday, -4);
+ // 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);
}