1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

fixing some bugs

git-svn-id: file:///svn/phpbb/trunk@7805 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2007-06-28 14:55:48 +00:00
parent d57a16ad69
commit f9ea21a083
9 changed files with 42 additions and 18 deletions

View File

@@ -469,8 +469,8 @@ class custom_profile
// case 'datetime':
case 'date':
$date = explode('-', $value);
$month = (isset($date[0])) ? (int) $date[0] : 0;
$day = (isset($date[1])) ? (int) $date[1] : 0;
$day = (isset($date[0])) ? (int) $date[0] : 0;
$month = (isset($date[1])) ? (int) $date[1] : 0;
$year = (isset($date[2])) ? (int) $date[2] : 0;
if (!$day && !$month && !$year)
@@ -479,7 +479,8 @@ class custom_profile
}
else if ($day && $month && $year)
{
return sprintf('%4d-%02d-%02d', $year, $month, $day);
global $user;
return $user->format_date(mktime(0, 0, 0, $month, $day, $year), $user->lang['DATE_FORMAT'], true);
}
return $value;