phpgroupware-developers
[Top][All Lists]
Advanced

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

Re: [Phpgroupware-developers] Timetrack timesheets page year problem


From: Chris Weiss
Subject: Re: [Phpgroupware-developers] Timetrack timesheets page year problem
Date: Fri, 03 Jan 2003 17:12:40 +0000

hm.  I don't use timetrack, but i just did a basic test..
<?
echo date("M-d-Y", mktime(2, 0, 0, 1, 6 - 7, 2003))."\n";
?>

and got Dec-28-2002 on both php 4.0.6 and 4.2.3 so it seems mktime works fine.
I also plugged in every day from dec 30 to jan 8 and all worked properly.

Brian Johnson (address@hidden) wrote*:
>
>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)
>
>
>
>_______________________________________________
>Phpgroupware-developers mailing list
>address@hidden
>http://mail.gnu.org/mailman/listinfo/phpgroupware-developers
>





reply via email to

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