DragonFire*_* wrote:New development. The fix listed in the first thread doesn't work when daylight savings switches back in the fall
Ok, found out the issue (even with latest release as of this posting).
Open include/functions.php
Find:
- Code: Select all
if ($birth_year>1970)
$epoch=$epoch+$epoch_Y*365-1+$leapyear;
else
$epoch=$epoch-$epoch_Y*365-1-$leapyear;
return $epoch;
Change to:
- Code: Select all
if ($birth_year>1970)
$epoch=$epoch+$epoch_Y*365+$leapyear;
else
$epoch=$epoch-$epoch_Y*365-1-$leapyear;
return $epoch;
The two epoch lines are the same. If your birthyear is >1970, it still subtracts 1. It should just use the epoch date as is.
Hope this helps.

//$leapyear=round((($epoch_Y+2) / 4)-0.5);
$leapyear=(($epoch_Y+2) / 4)-0.5;
If ($leapyear-floor($leapyear) >= 0.5)
{
$leapyear = floor($leapyear)+1;
}
else
{
$leapyear = floor($leapyear);
}

if ($birth_year>1970)
$epoch=$epoch+$epoch_Y*365+$leapyear;
else
$epoch=$epoch-$epoch_Y*365-$leapyear;
return $epoch;
//$leapyear=round((($epoch_Y+2) / 4)-0.5);
$leapyear=(($epoch_Y+2) / 4)-0.5;
If ($leapyear-floor($leapyear) >= 0.5)
{
$leapyear = floor($leapyear)+1;
}
else
{
$leapyear = floor($leapyear);
}function realdate($date_syntax="Ymd",$date=0)
{ return create_date($date_syntax,$date*86400,$board_config['board_timezone']); }


Return to Birthday [2.0.10/EM]
Users browsing this forum: No registered users and 1 guest