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

Merge branch 'feature/new-tz-handling' of https://github.com/p/phpbb3 into feature/new-tz-handling

Conflicts:
	phpBB/includes/functions_profile_fields.php
	phpBB/includes/session.php
	phpBB/install/database_update.php
This commit is contained in:
Joas Schilling
2012-06-04 18:09:35 +02:00
26 changed files with 395 additions and 211 deletions

View File

@@ -110,11 +110,12 @@ $legend = implode(', ', $legend);
$birthday_list = array();
if ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel'))
{
$now = phpbb_gmgetdate(time() + $user->timezone + $user->dst);
$time = $user->create_datetime();
$now = phpbb_gmgetdate($time->getTimestamp() + $time->getOffset());
// Display birthdays of 29th february on 28th february in non-leap-years
$leap_year_birthdays = '';
if ($now['mday'] == 28 && $now['mon'] == 2 && !$user->format_date(time(), 'L'))
if ($now['mday'] == 28 && $now['mon'] == 2 && !$time->format('L'))
{
$leap_year_birthdays = " OR u.user_birthday LIKE '" . $db->sql_escape(sprintf('%2d-%2d-', 29, 2)) . "%'";
}