Update of /cvsroot/phpicalendar/phpicalendar/functions
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29385/functions
Modified Files:
date_functions.php
Log Message:
Fix dates before 1970: Patch #2549612
Index: date_functions.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/functions/date_functions.php,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** date_functions.php 1 Feb 2009 21:22:24 -0000 1.50
--- date_functions.php 5 Feb 2009 15:34:44 -0000 1.51
***************
*** 250,254 ****
ereg ('([0-9]{4})([0-9]{2})([0-9]{2})', $data, $dt_check);
if ($dt_check[1] < 1970) {
! $data = '1971'.$dt_check[2].$dt_check[3];
}
# convert to date-time
--- 250,254 ----
ereg ('([0-9]{4})([0-9]{2})([0-9]{2})', $data, $dt_check);
if ($dt_check[1] < 1970) {
! $dt_check[1] = '1970';
}
# convert to date-time
***************
*** 262,266 ****
if (!isset ($regs[1])) return;
if ($regs[1] < 1970) {
! $regs[1] = '1971';
}
$date = $regs[1] . $regs[2] . $regs[3];
--- 262,266 ----
if (!isset ($regs[1])) return;
if ($regs[1] < 1970) {
! $regs[1] = '1970';
}
$date = $regs[1] . $regs[2] . $regs[3];
|