phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-developers] Timetrack timesheets page year problem


From: Brian Johnson
Subject: [Phpgroupware-developers] Timetrack timesheets page year problem
Date: Fri, 03 Jan 2003 14:14:38 +0000

I noticed that on the timesheets page (on my Redhat 7.3) system, that this week
starts in 2002 and ends in 2003.  When you hit the link to the previous week, it
jumps to Dec 2003 (I don't think mktime works as advertised)

Here's the fix, find these lines in timesheets.php:
$next = mktime(2, 0, 0, $thismonth, $thisday + 7, $thisyear);
$prev = mktime(2, 0, 0, $thismonth, $thisday - 7, $thisyear);
. "?
year=$prevyear&month=$prevmonth&day=$prevday&n_employee=$n_employee\"><<</A></
TD>";
. "?
year=$nextyear&month=$nextmonth&day=$nextday&n_employee=$n_employee\">>></A></
TD>";

and change them to:
$next = mktime(2, 0, 0, $thismonth, $thisday, $thisyear) + (3600 * 24 * 7);
$prev = mktime(2, 0, 0, $thismonth, $thisday, $thisyear) - (3600 * 24 * 7);
. "?
&year=$prevyear&month=$prevmonth&day=$prevday&n_employee=$n_employee\"><<</A><
/TD>";
. "?
&year=$nextyear&month=$nextmonth&day=$nextday&n_employee=$n_employee\">>></A><
/TD>";


Note that these lines are not grouped together, you will have to find and change
each one individually.


PS I'll post this as a patch when my other patch gets committed (when leading 
it is
sometimes wise to turn around to see if anyone is following)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]