mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +01:00
fix for gnu-bug #136:
dates in week-selectbox are (sometimes) wrong, the endate of a week is the same as the startdate of the next one This is caused by changes in daylight saveing and useing midnight for the calculation, changed it to midday
This commit is contained in:
parent
42e8f97101
commit
1b49725830
@ -2612,8 +2612,9 @@
|
||||
$str = '';
|
||||
for ($i = -7; $i <= 7; $i++)
|
||||
{
|
||||
$begin = $sun + (604800 * $i);
|
||||
$end = $begin + 604799;
|
||||
$begin = $sun + (7*24*60*60 * $i) + 12*60*60; // we use midday, that changes in daylight-saveing does not effect us
|
||||
$end = $begin + 6*24*60*60;
|
||||
// echo "<br>$i: ".date('d.m.Y H:i',$begin).' - '.date('d.m.Y H:i',$end);
|
||||
$str .= '<option value="' . $GLOBALS['phpgw']->common->show_date($begin,'Ymd') . '"'.($begin <= $thisdate && $end >= $thisdate?' selected':'').'>'
|
||||
. $GLOBALS['phpgw']->common->show_date($begin,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']) . ' - '
|
||||
. $GLOBALS['phpgw']->common->show_date($end,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);
|
||||
|
Loading…
Reference in New Issue
Block a user