Special thanks to @Znote for help
PHP:
function getClock($time = false, $format = false, $adjust = true) {
if ($time === false) $time = time();
// Date string representation
$date = "d F Y (H:i)"; // 15 July 2013 (13:50)
if ($adjust) $adjust = (1 * 3600); // Adjust to fit your timezone.
else $adjust = 0;
if ($format) {
$EnglishMonth = date("F", $time+$adjust);
// Will be translated to polish in switch statement
$PolishMonth = $EnglishMonth;
switch ($EnglishMonth) {
case 'January':
$Polishmonth = "PolishJanuary";
break;
case 'February':
$Polishmonth = "PolishFebruary";
break;
// And so on....
case 'December':
$Polishmonth = "PolishDecember";
break;
}
return str_replace($EnglishMonth, $Polishmonth, date($date, $time+$adjust));
}
else {
return $time+$adjust;
}
}