diff -ubBwr --exclude=uploads --exclude=images --exclude=images_pcf --exclude=config.php --exclude=languages/polish --exclude=settings.php Upload/admin/adminfunctions.php forum/admin/adminfunctions.php
--- Upload/admin/adminfunctions.php	2006-09-28 13:02:52.000000000 +0200
+++ forum/admin/adminfunctions.php	2006-10-22 20:24:34.000000000 +0200
@@ -890,7 +890,7 @@
 	{
 		$mybbversion = $mybb->version;
 	}
-	echo "<font size=\"1\" face=\"Verdana,Arial,Helvetica\">\n".$lang->footer_powered_by."\n<b>\n<a href=\"http://www.mybboard.net\" target=\"_blank\">MyBB</a> $mybbversion\n</b>\n<br />\n".$lang->footer_copyright." &copy; 2002-".my_date("Y")." <a href=\"http://www.mybboard.net\">MyBB Group</a>\n<br />\n".$lang->footer_stats."\n</font>\n</div>\n";
+	echo "<font size=\"1\" face=\"Verdana,Arial,Helvetica\">\n".$lang->footer_powered_by."\n<b>\n<a href=\"http://www.mybboard.net\" target=\"_blank\">MyBB</a> $mybbversion\n</b>\n<br />\n".$lang->footer_copyright." &copy; 2002-".my_date("%Y")." <a href=\"http://www.mybboard.net\">MyBB Group</a>\n<br />\n".$lang->footer_stats."\n</font>\n</div>\n"; // KK: (polish_time.mod) my_date("Y") -> my_date("%Y")
 	echo "</body>\n";
 	echo "</html>";
 }
@@ -2194,7 +2198,8 @@
 	$dropdown .= "</select>\n";
 
 	// Add years to the dropdown.
-	$this_year = my_date("Y");
+//	$this_year = my_date("Y");
+	$this_year = my_date("%Y");	// KK: (polish_time.mod)
 	$years = array();
 
 	// Is there a specified limit for showing the years?
@@ -2290,7 +2295,8 @@
 		$query = $db->simple_select(TABLE_PREFIX.'themes', 'tid,name,css', "tid='".intval($tid)."'");
 		$theme = $db->fetch_array($query);
 
-		$theme['css'] = "/**\n * CSS for theme \"{$theme['name']}\" (tid {$theme['tid']})\n * Cached:".my_date("r")."\n *\n * DO NOT EDIT THIS FILE\n *\n */\n\n".$theme['css'];
+		// $theme['css'] = "/**\n * CSS for theme \"{$theme['name']}\" (tid {$theme['tid']})\n * Cached:".my_date("r")."\n *\n * DO NOT EDIT THIS FILE\n *\n */\n\n".$theme['css'];
+		$theme['css'] = "/**\n * CSS for theme \"{$theme['name']}\" (tid {$theme['tid']})\n * Cached:".date("r")."\n *\n * DO NOT EDIT THIS FILE\n *\n */\n\n".$theme['css']; // KK: (polish_time.mod) - strftime("%a, %d %b %Y %T %Z") to nie to samo
 		$theme['css'] = preg_replace("#url\((\"|'|)(.*)\\1\)#e", "fix_css_urls('$2')", $theme['css']);
 
 		$fp = @fopen($filename, "w");
diff -ubBr --exclude=uploads --exclude=images --exclude=images_pcf --exclude=config.php --exclude=languages --exclude=settings.php Upload/admin/users.php forum/admin/users.php
--- Upload/admin/users.php	2006-09-03 14:55:12.000000000 +0200
+++ forum/admin/users.php	2006-09-06 10:49:15.000000000 +0200
@@ -1103,8 +1130,11 @@
 	$referrals = $db->fetch_field($query, 'count');

 	$memregdate = my_date($mybb->settings['dateformat'], $user['regdate']);
-	$memlocaldate = gmdate($mybb->settings['dateformat'], time() + ($user['timezone'] * 3600));
-	$memlocaltime = gmdate($mybb->settings['timeformat'], time() + ($user['timezone'] * 3600));
+	// KK: polish_time.mod
+//	$memlocaldate = gmdate($mybb->settings['dateformat'], time() + ($user['timezone'] * 3600));
+//	$memlocaltime = gmdate($mybb->settings['timeformat'], time() + ($user['timezone'] * 3600));
+	$memlocaldate = gmstrftime($mybb->settings['dateformat'], time() + ($user[timezone] * 3600));
+	$memlocaltime = gmstrftime($mybb->settings['timeformat'], time() + ($user[timezone] * 3600));
 	$memlastvisitdate = my_date($mybb->settings['dateformat'], $user['lastvisit']);
 	$memlastvisittime = my_date($mybb->settings['timeformat'], $user['lastvisit']);

@@ -1116,12 +1146,14 @@
 			$bdayformat = fix_mktime($mybb->settings['dateformat'], $membday[2]);
 			$membday = mktime(0, 0, 0, $membday[1], $membday[0], $membday[2]);
 			$membdayage = "(" . floor((time() - $membday) / 31557600) . " ".$lang->years_old .")";
-			$membday = gmdate($bdayformat, $membday);
+//			$membday = gmdate($bdayformat, $membday);   // KK polish_time.mod
+			$membday = gmstrftime($bdayformat, $membday);
 		}
 		else
 		{
 			$membday = mktime(0, 0, 0, $membday[1], $membday[0], 0);
-			$membday = gmdate("F j", $membday);
+//			$membday = gmdate("F j", $membday);    // KK polish_time.mod
+			$membday = gmstrftime("%e %B", $membday);
 			$membdayage = $lang->not_specified;
 		}
 	}
diff -ubBr --exclude=uploads --exclude=images --exclude=images_pcf --exclude=config.php --exclude=languages --exclude=settings.php Upload/archive/global.php forum/archive/global.php
--- Upload/archive/global.php	2006-09-03 14:55:28.000000000 +0200
+++ forum/archive/global.php	2006-09-17 14:17:58.000000000 +0200
@@ -16,6 +16,7 @@
 chdir('./../');

 require_once dirname(dirname(__FILE__))."/inc/init.php";
+setlocale(LC_TIME, "pl_PL.UTF-8") ;		// KK polish_time.mod

 require_once MYBB_ROOT."inc/functions_archive.php";
 require_once MYBB_ROOT."inc/class_session.php";
diff -ubBr --exclude=uploads --exclude=images --exclude=images_pcf --exclude=config.php --exclude=languages --exclude=settings.php Upload/global.php forum/global.php
--- Upload/global.php	2006-09-03 14:55:56.000000000 +0200
+++ forum/global.php	2006-09-17 14:18:04.000000000 +0200
@@ -11,6 +11,7 @@

 // Load main MyBB core file which begins all of the magic
 require_once "./inc/init.php";
+setlocale(LC_TIME, "pl_PL.UTF-8") ;		// KK polish_time.mod

 $shutdown_queries = array();

@@ -195,7 +196,8 @@
 // Set the current date and time now
 $datenow = my_date($mybb->settings['dateformat'], time(), '', false);
 $timenow = my_date($mybb->settings['timeformat'], time());
-$lang->welcome_current_time = sprintf($lang->welcome_current_time, $datenow.', '.$timenow);
+//$lang->welcome_current_time = sprintf($lang->welcome_current_time, $datenow.', '.$timenow);
+$lang->welcome_current_time = sprintf($lang->welcome_current_time, $timenow.', '.$datenow); //KK: polish_time.mod.

 // Format the last visit date of this user appropriately
 if(isset($mybb->user['lastvisit']))
@@ -315,7 +333,8 @@
 eval("\$htmldoctype = \"".$templates->get("htmldoctype", 1, 0)."\";");
 eval("\$header = \"".$templates->get("header")."\";");

-$copy_year = my_date("Y", time());
+//$copy_year = my_date("Y", time());  // KK: polish_time.mod
+$copy_year = my_date("%Y", time());

 // Are we showing version numbers in the footer?
 if($mybb->settings['showvernum'] == "on")
diff -ubBwr --exclude=uploads --exclude=images --exclude=images_pcf --exclude=config.php --exclude=languages/polish --exclude=settings.php Upload/calendar.php forum/calendar.php
--- Upload/calendar.php	2006-12-04 11:39:43.000000000 +0100
+++ forum/calendar.php	2006-12-21 20:48:18.000000000 +0100
@@ -63,13 +63,15 @@
 {
 	// Let's find the date we're looking at.
 	// First of all, the year
-	if($mybb->input['year'] && $mybb->input['year'] <= my_date("Y")+5)
+//	if($mybb->input['year'] && $mybb->input['year'] <= my_date("Y")+5)  // KK: polish_time.mod
+	if($mybb->input['year'] && $mybb->input['year'] <= my_date("%Y")+5)
 	{
 		$year = intval($mybb->input['year']);
 	}
 	else
 	{
-		$year = my_date("Y");
+//		$year = my_date("Y");  // KK: polish_time.mod
+		$year = my_date("%Y");
 	}
 	// Then the month
 	if($mybb->input['month'] >=1 && $mybb->input['month'] <= 12)
@@ -78,11 +80,13 @@
 	}
 	else
 	{
-		$month = my_date("n");
+//		$month = my_date("n");  // KK: polish_time.mod
+		$month = intval(my_date("%m")); // has to be intval, because strftime() returns '01'
 	}
 	// Find the number of days in that month
 	$time = gmmktime(0, 0, 0, $month, 1, $year);
-	$days = my_date("t", $time);
+//	$days = my_date("t", $time); // KK: polish_time.mod
+	$days = date("t", $time);  // strftime() nie ma takiej opcji
 	// Now the specific day
 	if(isset($mybb->input['day']) && $mybb->input['day'] >= 1 && $mybb->input['day'] <= $days)
 	{
@@ -104,7 +108,8 @@
 		// This shouldn't be needed, but just in case if someone falls into the hole...
 		else
 		{
-			$day = my_date("j");
+//			$day = my_date("j");  // KK: polish_time.mod
+			$day = my_date("%e");
 		}
 	}
 }
@@ -198,7 +203,8 @@
 
 	// Load Birthdays
 	// If we have 1st March and this year isn't a leap year, fetch birthdays on the 29th.
-	if($day == 1 && $month == 3 && my_date("L", mktime(0, 0, 0, $month, 1, $year)) != 1)
+//	if($day == 1 && $month == 3 && my_date("L", mktime(0, 0, 0, $month, 1, $year)) != 1)  // KK: polish_time.mod (mktime produkuje date "dzien wczesniej")
+	if($day == 1 && $month == 3 && date("L", gmmktime(0, 0, 0, $month, 1, $year)) != 1)	// strftime() nie ma "L" (leap year)
 	{
 		$bday_where = "birthday LIKE '$day-$month-%' OR birthday LIKE '29-2%' OR birthday LIKE '$day-$month'";
 		$feb_fix = 1;
@@ -361,7 +367,8 @@
 	}
 
 	//Construct option list for years
-	for($i = my_date("Y"); $i < (my_date("Y") + 5); $i++)
+//	for($i = my_date("Y"); $i < (my_date("Y") + 5); $i++)  // KK: polish_time.mod
+	for($i = my_date("%Y"); $i < (my_date("%Y") + 5); $i++)
 	{
 		if($i == $year)
 		{
@@ -567,13 +574,17 @@
 {
 	$plugins->run_hooks("calendar_start");
 
-	$time = mktime(0, 0, 0, $month, 1, $year);
+//	$time = mktime(0, 0, 0, $month, 1, $year); // KK: polish_time.bug - Using mktime() produces bad day in some timezones (one day in the past)
+	$time = gmmktime(0, 0, 0, $month, 1, $year);
- 	$days = my_date("t", $time);
+// 	$days = my_date("t", $time); // strftime() nie ma "t" (number of days in month)
+ 	$days = date("t", $time);
 	$bdays = array();
 
 	// Load Birthdays
 	// If we have 1st March and this year isn't a leap year, fetch birthdays on the 29th.
-	if($month == 3 && my_date("L", mktime(0, 0, 0, $month, 1, $year)) != 1)
+	// KK: polish_time.bug - Using mktime() produces bad day in some timezones (one day in the past)
+//	if($month == 3 && my_date("L", mktime(0, 0, 0, $month, 1, $year)) != 1) // KK: polish_time.mod
+	if($month == 3 && date("L", gmmktime(0, 0, 0, $month, 1, $year)) != 1)
 	{
 		$bday_where = "birthday LIKE '%-$month-%' OR birthday LIKE '29-2%' OR birthday LIKE '%-$month'";
 		$feb_fix = 1;
@@ -621,7 +632,8 @@
 	}
 	$daybits = "<tr>\n";
 	$count = 0;
-	$sblanks = my_date("w", $time);
+	//$sblanks = my_date("w", $time); // KK: polish_time.mod
+	$sblanks = my_date("%w", $time);
 	// Blank space before first day
 	if($sblanks)
 	{
@@ -650,7 +662,8 @@
 		{
 			$events[$i] = "&nbsp;";
 		}
-		if((my_date("d") == $i) && (my_date("n") == $month) && (my_date("Y") == $year))
+//		if((my_date("d") == $i) && (my_date("n") == $month) && (my_date("Y") == $year))  // KK: polish_time.mod
+		if((my_date("%e") == $i) && (my_date("%m") == $month) && (my_date("%Y") == $year))
 		{
 			eval("\$daybits .= \"".$templates->get("calendar_daybit_today")."\";");
 		}
@@ -714,7 +727,8 @@
 
 
 	$yearsel = '';
-	for($i = my_date("Y"); $i < (my_date("Y") + 5); $i++)
+//	for($i = my_date("Y"); $i < (my_date("Y") + 5); $i++)	// KK: polish_time.mod
+	for($i = my_date("%Y"); $i < (my_date("%Y") + 5); $i++)
 	{
 		$yearsel .= "<option value=\"$i\">$i</option>\n";
 	}
diff -ubBr --exclude=uploads --exclude=images --exclude=images_pcf --exclude=config.php --exclude=languages --exclude=settings.php Upload/inc/class_session.php forum/inc/class_session.php
--- Upload/inc/class_session.php	2006-09-03 15:03:01.000000000 +0200
+++ forum/inc/class_session.php	2006-09-06 10:54:56.000000000 +0200
@@ -204,40 +204,52 @@
 			switch($mybb->user['dateformat'])
 			{
 				case "1":
-					$mybb->settings['dateformat'] = "m-d-Y";
+//					$mybb->settings['dateformat'] = "m-d-Y";  // KK: polish_time.mod
+					$mybb->settings['dateformat'] = "%m-%e-%Y";
 					break;
 				case "2":
-					$mybb->settings['dateformat'] = "m-d-y";
+//					$mybb->settings['dateformat'] = "m-d-y";  // KK: polish_time.mod
+					$mybb->settings['dateformat'] = "%m-%e-%y";
 					break;
 				case "3":
-					$mybb->settings['dateformat'] = "m.d.Y";
+//					$mybb->settings['dateformat'] = "m.d.Y";  // KK: polish_time.mod
+					$mybb->settings['dateformat'] = "%m.%e.%Y";
 					break;
 				case "4":
-					$mybb->settings['dateformat'] = "m.d.y";
+//					$mybb->settings['dateformat'] = "m.d.y";  // KK: polish_time.mod
+					$mybb->settings['dateformat'] = "%m.%e.%y";
 					break;
 				case "5":
-					$mybb->settings['dateformat'] = "d-m-Y";
+//					$mybb->settings['dateformat'] = "d-m-Y";  // KK: polish_time.mod
+					$mybb->settings['dateformat'] = "%e-%m-%Y";
 					break;
 				case "6":
-					$mybb->settings['dateformat'] = "d-m-y";
+//					$mybb->settings['dateformat'] = "d-m-y";  // KK: polish_time.mod
+					$mybb->settings['dateformat'] = "%e-%m-%y";
 					break;
 				case "7":
-					$mybb->settings['dateformat'] = "d.m.Y";
+//					$mybb->settings['dateformat'] = "d.m.Y";  // KK: polish_time.mod
+					$mybb->settings['dateformat'] = "%e.%m.%Y";
 					break;
 				case "8":
-					$mybb->settings['dateformat'] = "d.m.y";
+//					$mybb->settings['dateformat'] = "d.m.y";  // KK: polish_time.mod
+					$mybb->settings['dateformat'] = "%e.%m.%y";
 					break;
 				case "9":
-					$mybb->settings['dateformat'] = "F jS, Y";
+//					$mybb->settings['dateformat'] = "F jS, Y";  // KK: polish_time.mod
+					$mybb->settings['dateformat'] = "%B %e, %Y";
 					break;
 				case "10":
-					$mybb->settings['dateformat'] = "l, F jS, Y";
+//					$mybb->settings['dateformat'] = "l, F jS, Y";  // KK: polish_time.mod
+					$mybb->settings['dateformat'] = "%A, %B %e, %Y";
 					break;
 				case "11":
-					$mybb->settings['dateformat'] = "jS F Y";
+//					$mybb->settings['dateformat'] = "jS F Y";  // KK: polish_time.mod
+					$mybb->settings['dateformat'] = "%e %B %Y";
 					break;
 				case "12":
-					$mybb->settings['dateformat'] = "l, jS F Y";
+//					$mybb->settings['dateformat'] = "l, jS F Y";  // KK: polish_time.mod
+					$mybb->settings['dateformat'] = "%A, %e %B %Y";
 					break;
 				default:
 					break;
@@ -249,13 +261,16 @@
 		{
 			switch($mybb->user['timeformat']) {
 				case "1":
-					$mybb->settings['timeformat'] = "h:i a";
+//					$mybb->settings['timeformat'] = "h:i a";  // KK: polish_time.mod
+					$mybb->settings['timeformat'] = "%I:%M %p";
 					break;
 				case "2":
-					$mybb->settings['timeformat'] = "h:i A";
+//					$mybb->settings['timeformat'] = "h:i A";  // KK: polish_time.mod
+					$mybb->settings['timeformat'] = "%I:%M %P";
 					break;
 				case "3":
-					$mybb->settings['timeformat'] = "H:i";
+//					$mybb->settings['timeformat'] = "H:i";  // KK: polish_time.mod
+					$mybb->settings['timeformat'] = "%H:%M";
 					break;
 			}
 		}
diff -ubBwr --exclude=uploads --exclude=images --exclude=images_pcf --exclude=config.php --exclude=languages/polish --exclude=settings.php Upload/inc/functions.php forum/inc/functions.php
--- Upload/inc/functions.php	2007-06-30 11:29:27.000000000 +0200
+++ forum/inc/functions.php	2007-06-30 11:27:42.000000000 +0200
@@ -291,12 +291,29 @@
 	{
 		$offset = 0;
 	}
-	$date = gmdate($format, $stamp + ($offset * 3600));
+	// $date = gmdate($format, $stamp + ($offset * 3600));
+	// KK: (polish_time.mod)
+	$calculated_stamp = $stamp + ($offset * 3600) ; // KK
+	if (strstr($format, '%I:%M'))
+	{
+		$new_format = str_replace('%I:%M %p', gmdate('h:i a', $calculated_stamp), $format) ;
+		$new_format = str_replace('%I:%M %P', gmdate('h:i A', $calculated_stamp), $new_format) ;
+	}
+	else
+	{
+		$new_format = $format ;
+	}
+	$date = gmstrftime($new_format, $calculated_stamp);
+	// KK^
 	if($mybb->settings['dateformat'] == $format && $ty)
 	{
-		$stamp = time();
-		$todaysdate = gmdate($format, $stamp + ($offset * 3600));
-		$yesterdaysdate = gmdate($format, ($stamp - 86400) + ($offset * 3600));
+		// KK: (polish_time.mod) - dla optymalizacji
+//		$stamp = time();
+//		$todaysdate = gmdate($format, $stamp + ($offset * 3600));
+//		$yesterdaysdate = gmdate($format, ($stamp - 86400) + ($offset * 3600));
+		$stamp = time() + ($offset * 3600);
+		$todaysdate = gmdate($format, $stamp);
+		$yesterdaysdate = gmdate($format, $stamp - 86400);
 		if($todaysdate == $date)
 		{
 			$date = $lang->today;
@@ -2169,8 +2220,11 @@
 {
 	// Our little work around for the date < 1970 thing.
 	// -2 idea provided by Matt Light (http://www.mephex.com)
-	$format = str_replace("Y", $year, $format);
-	$format = str_replace("y", my_substr($year, -2), $format);
+	// KK: polish_time.mod
+//	$format = str_replace("Y", $year, $format);
+//	$format = str_replace("y", my_substr($year, -2), $format);
+	$format = str_replace("%Y", $year, $format);
+	$format = str_replace("%y", substr($year, -2), $format);
 	return $format;
 }
 
@@ -2995,7 +3049,8 @@
 
 	$bdays = array($lang->sunday, $lang->monday, $lang->tuesday, $lang->wednesday, $lang->thursday, $lang->friday, $lang->saturday);
 	$bmonth = array($lang->month_1, $lang->month_2, $lang->month_3, $lang->month_4, $lang->month_5, $lang->month_6, $lang->month_7, $lang->month_8, $lang->month_9, $lang->month_10, $lang->month_11, $lang->month_12);
-	$find = array('m', 'd', 'y', 'Y', 'j', 'S', 'F', 'l');
+//	$find = array('m', 'd', 'y', 'Y', 'j', 'S', 'F', 'l');	// KK: polish_time.mod
+	$find = array('%m', '%d', '%y', '%Y', '%e', '', '%B', '%A'); // 'S' - removed... strftime does not have it
 	$replace = array((sprintf('%02s', $bm)), (sprintf('%02s', $bd)), (my_substr($by, 2)), $by, ($bd[0] == 0 ? my_substr($bd, 1) : $bd), ($db == 1 || $db == 21 || $db == 31 ? 'st' : ($db == 2 || $db == 22 ? 'nd' : ($db == 3 || $db == 23 ? 'rd' : 'th'))), $bmonth[$bm-1], $bdays[$wd]);
 	return(str_replace($find, $replace, $display));
 }
@@ -3014,7 +3069,8 @@
 		return;
 	}
 
-	list($day, $month, $year) = explode("-", my_date("j-n-Y", time(), 0, 0));
+	//list($day, $month, $year) = explode("-", my_date("j-n-Y", time(), 0, 0)); // KK: polish_time.mod
+	list($day, $month, $year) = explode("-", my_date("%e-%m-%Y", time(), 0, 0));
 
 	$age = $year-$bday[2];
 
diff -ubBr --exclude=uploads --exclude=images --exclude=images_pcf --exclude=config.php --exclude=languages --exclude=settings.php Upload/index.php forum/index.php
--- Upload/index.php	2006-09-03 15:06:17.000000000 +0200
+++ forum/index.php	2006-09-06 11:09:06.000000000 +0200
@@ -157,8 +157,12 @@
 	// First, see what day this is.
 	$bdaycount = 0;
 	$bdaytime = time();
-	$bdaydate = my_date("j-n", $bdaytime, '', 0);
-	$year = my_date("Y", $bdaytime, '', 0);
+//	$bdaydate = my_date("j-n", $bdaytime, '', 0);  // KK: polish_time.mod
+//	$year = my_date("Y", $bdaytime, '', 0);
+	$bdaydate = intval(my_date("%e", $bdaytime, '', 0)) . '-' . intval(my_date("%m", $bdaytime, '', 0));
+	// strftime(%e) returns ' 1' in day, so it has to be intval
+	// strftime(%m) returns '01' in month, so it has to be intval
+	$year = my_date("%Y", $bdaytime, '', 0);
 
 	// Select all users who have their birthday today.
 	$query = $db->simple_select(TABLE_PREFIX."users", "uid, username, birthday", "birthday LIKE '$bdaydate-%'");
diff -ubBwr --exclude=uploads --exclude=images --exclude=images_pcf --exclude=config.php --exclude=languages/polish --exclude=settings.php Upload/member.php forum/member.php
--- Upload/member.php	2007-05-17 14:36:43.000000000 +0200
+++ forum/member.php	2007-05-17 14:36:36.000000000 +0200
@@ -1160,8 +1175,11 @@
 		}
 	}
 	$memregdate = my_date($mybb->settings['dateformat'], $memprofile['regdate']);
-	$memlocaldate = gmdate($mybb->settings['dateformat'], time() + ($memprofile['timezone'] * 3600));
-	$memlocaltime = gmdate($mybb->settings['timeformat'], time() + ($memprofile['timezone'] * 3600));
+	// KK: polish_time.mod
+//	$memlocaldate = gmdate($mybb->settings['dateformat'], time() + ($memprofile['timezone'] * 3600));
+//	$memlocaltime = gmdate($mybb->settings['timeformat'], time() + ($memprofile['timezone'] * 3600));
+	$memlocaldate = gmstrftime($mybb->settings['dateformat'], time() + ($memprofile['timezone'] * 3600));
+	$memlocaltime = gmstrftime($mybb->settings['timeformat'], time() + ($memprofile['timezone'] * 3600));

 	$localtime = sprintf($lang->local_time_format, $memlocaldate, $memlocaltime);

@@ -1181,7 +1200,8 @@
 		$membday = explode("-", $memprofile['birthday']);
 		if($membday[2])
 		{
-			$year = my_date("Y");
+//			$year = my_date("Y"); // KK: polish_time.mod
+			$year = my_date("%Y");
 			$lang->membdayage = sprintf($lang->membdayage, get_age($memprofile['birthday']));
 			$membdayage = $lang->membdayage;
 			if($membday[2] < 1970)
@@ -1193,13 +1213,15 @@
 			{
 				$bdayformat = fix_mktime($mybb->settings['dateformat'], $membday[2]);
 				$membday = mktime(0, 0, 0, $membday[1], $membday[0], $membday[2]);
-				$membday = date($bdayformat, $membday);
+//				$membday = date($bdayformat, $membday);  // KK: polish_time.mod
+				$membday = strftime($bdayformat, $membday);
 			}
 		}
 		else
 		{
 			$membday = mktime(0, 0, 0, $membday[1], $membday[0], 0);
-			$membday = date("F j", $membday);
+//			$membday = date("F j", $membday);  // KK: polish_time.mod
+			$membday = strftime("%e %B", $membday);
 			$membdayage = '';
 		}
 	}
diff -ubBr --exclude=uploads --exclude=images --exclude=images_pcf --exclude=config.php --exclude=languages --exclude=settings.php Upload/moderation.php forum/moderation.php
--- Upload/moderation.php	2006-09-03 15:09:16.000000000 +0200
+++ forum/moderation.php	2006-09-11 15:56:50.000000000 +0200
@@ -552,7 +552,8 @@
 		");
 		while($modaction = $db->fetch_array($query))
 		{
-			$modaction['dateline'] = my_date("jS M Y, G:i", $modaction['dateline']);
+//			$modaction['dateline'] = my_date("jS M Y, G:i", $modaction['dateline']);  // KK: polish_time.mod
+			$modaction['dateline'] = my_date("%d %b %G, %H:%M", $modaction['dateline']);
 			$info = '';
 			if($modaction['tsubject'])
 			{
--- forum/usercp.php	2007-02-07 21:50:17.000000000 +0100
+++ forum_temp/usercp.php	2007-02-15 16:55:58.000000000 +0100
@@ -166,12 +166,14 @@
 		{
 			if(!$mybb->input['awaymonth'])
 			{
-				$mybb->input['awaymonth'] = my_date('n', $awaydate);
+				// $mybb->input['awaymonth'] = my_date('n', $awaydate); // KK: polish_time.mod
+				$mybb->input['awaymonth'] = intval(my_date('%m', $awaydate)); // has to be intval, because strftime() returns '01'
 			}
 			
 			if(!$mybb->input['awayyear'])
 			{
-				$mybb->input['awayyear'] = my_date('Y', $awaydate);
+				// $mybb->input['awayyear'] = my_date('Y', $awaydate); // KK: polish_time.mod
+				$mybb->input['awayyear'] = my_date('%Y', $awaydate);
 			}
 			
 			if($mybb->input['awayyear'] >= 2038)
@@ -180,8 +182,11 @@
 			}
 			
 			$returntimestamp = gmmktime(0, 0, 0, $mybb->input['awaymonth'], $mybb->input['awayday'], $mybb->input['awayyear']);
-			$awaytimestamp = gmmktime(0, 0, 0, my_date('n', $awaydate), my_date('j', $awaydate), my_date('Y', $awaydate));
-			if($returntimestamp < $awaytimestamp && $mybb->input['awayyear'] < my_date("Y"))
+			// KK: polish_time.mod
+			//$awaytimestamp = gmmktime(0, 0, 0, my_date('n', $awaydate), my_date('j', $awaydate), my_date('Y', $awaydate));
+			//if($returntimestamp < $awaytimestamp && $mybb->input['awayyear'] < my_date("Y"))
+			$awaytimestamp = gmmktime(0, 0, 0, my_date('%m', $awaydate), my_date('%d', $awaydate), my_date('%Y', $awaydate));
+			if($returntimestamp < $awaytimestamp && $mybb->input['awayyear'] < my_date("%Y"))
 			{
 				error($lang->error_usercp_return_date_past);
 			}

