Code Duplication    Length = 6-6 lines in 2 locations

main/inc/lib/attendance.lib.php 1 location

@@ 1772-1777 (lines=6) @@
1769
        $values = api_get_utc_datetime($timestamp);
1770
        $values = str_replace(array(':', '-', ' '), '/', $values);
1771
        list($y, $m, $d, $h, $n, $s) = split('/', $values);
1772
        if ($m + $num > 12) {
1773
            $y += floor($num / 12);
1774
            $m += $num % 12;
1775
        } else {
1776
            $m += $num;
1777
        }
1778
        //date_default_timezone_set('UTC');
1779
        // return mktime($h, $n, $s, $m, $d, $y);
1780
        $result = api_strtotime($y.'-'.$m.'-'.$d.' '.$h.':'.$n.':'.$s, 'UTC');

main/inc/lib/agenda.lib.php 1 location

@@ 2837-2842 (lines=6) @@
2834
            '/',
2835
            date('Y/m/d/h/i/s', $timestamp)
2836
        );
2837
        if ($m + $num > 12) {
2838
            $y += floor($num / 12);
2839
            $m += $num % 12;
2840
        } else {
2841
            $m += $num;
2842
        }
2843
2844
        return mktime($h, $n, $s, $m, $d, $y);
2845
    }