Fork me on GitHub

Biorhythms days problem  Bottom

  • I used the Biorhythms module but as far as I know the support for this one has ended. There is a problem with the module which I hope someone can fix. I looked through the php.net pages and tried some things but failed so far. The problem is the piece of code below:

    //
    $lived_days = (mktime(date('H'),date('i'),date('s'),$m2,$D2,$y2)-mktime(0, 0, 1, $m1, $d1, $y1));
    $lived_days /= 86400.0;
    $lived_days = abs($lived_days);
    //

    the use of mktime restricts the years to 1970 - 2038 and since this is a Biorhythms module you can imagine I have users that are born before 1970. Anyone got any idea how i can get a correct amount of "days lived" from people born before 1970??
  • Curious, Did u found the solution? What change it requires?

    TIA
  • yes I did and will post the code changes i made as soon as i can :)
  • Can't find the edits I made just now but I just took the module from my modules folder and zipped it for you, it should work ok, let me know if you got any problems with it.

    you can download it here:

    biorhythms10.zip

    Have fun
  • Ups sorry I am getting this error:
    Fatal error: Call to undefined function gregorianToJD() in /usr/local/apache2/htdocs2/modules/Biorhythms/index.php on line 176

    cry

This list is based on users active over the last 60 minutes.