Hallo,
mit folgendem Code lokal bei mir erhalte ich den Monat Dezember zurück.
Wenn ich diesen Code jedoch auf meinem vServer ausführe erhalte ich December zurück.
Kann es an der Zeitzone liegen?
PHP
<?php
##############################################################################################################################
##############################################################################################################################
$month = isset($_GET['month']) ? intval($_GET['month']) : date('n');
$year = isset($_GET['year']) ? intval($_GET['year']) : date('Y');
if($month == "0"){$month = date("Y",$timestamp);}
if($year == "0"){$year = date("n",$timestamp);}
$options['today_class'] = "background-color:#FFFF00;font-weight:bold;color:#5F98B5;";
$weekdays = array('So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa');
$prev_symbol = "«";
$next_symbol = "»";
$options['month_link'] = '<a href="'.$_SERVER['PHP_SELF'].'?month=%d&year=%d">%s</a>';
$total_days = date('t', mktime(0, 0, 0, $month, 1, $year));
$day_offset = date('w', mktime(0, 0, 0, $month, 1, $year));
list($n_month, $n_year, $n_day) = split(', ', strftime('%m, %Y, %d'));
$day_highlight = (($n_month == $month) + ($n_year == $year));
list($n_prev_month, $n_prev_year) = split(', ', strftime('%m, %Y', mktime(0, 0, 0, $month-1, 1, $year)));
$prev_month_link = sprintf($options['month_link'], $n_prev_month, $n_prev_year, $prev_symbol);
list($n_next_month, $n_next_year) = split(', ', strftime('%m, %Y', mktime(0, 0, 0, $month+1, 1, $year)));
$next_month_link = sprintf($options['month_link'], $n_next_month, $n_next_year, $next_symbol);
echo strftime('%B %Y', mktime(0, 0, 0, $month, 1, $year));
?>
Alles anzeigen
Habe schon folgendes getan
apt-get update; apt-get install tzdata -y
dpkg-reconfigure tzdata
dann
/etc/init.d/apache2 restart
und in der php.ini
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "Europe/Brussels"