Volgens mij zit in de code de oplossing. Maar ik kan hem niet lezen.
Code: Selecteer alles
includes/functions.php
#
#-----[ FIND ]------------------------------------------
#
//
// Create date/time from format and timezone
//
function create_date($format, $gmepoch, $tz)
#
#-----[ BEFORE, ADD ]------------------------------------------
#
//
// daytime changer summertime / wintertime
//
function daytime()
{
$n = date("n");
$y = date("Y")-2000;
if ( $n >= 3 && $n <= 10 )
{
$season = 1;
$season_math = 5;
}
else if ( $n >= 11 || $n < 3 )
{
$season = 0;
$season_math = 2;
}
$day = 31 - ((((floor(5*$y/4)-floor($y/100)+floor($y/400))+$season_math)%7)+7)%7;
switch ($season)
{
case 0:
if( mktime(date("H"),date("i"),date("s"),date("m"),date("d"),date("Y")) > mktime (3,0,0,10,$day,date("Y")) )
{
$result = 0;
}
break;
case 1:
if( mktime(date("H"),date("i"),date("s"),date("m"),date("d"),date("Y")) > mktime(3,0,0,3,$day,date("Y")) )
{
$result = 3600;
}
break;
}
return $result;
}
#
#-----[ FIND ]------------------------------------------
#
return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz)), $translate) : @gmdate($format, $gmepoch + (3600 * $tz));
#
#-----[ REPLACE WITH ]------------------------------------------
#
return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz) + daytime()), $translate) : @gmdate($format, $gmepoch + (3600 * $tz) + daytime());
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM