X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=SimpleExcel.php;fp=SimpleExcel.php;h=829a2b0427c4ea2c2ebf1e0946096a5faa50f0a2;hb=53a7b6d5941af5438f8e1682dad6d28f82dce980;hp=484808cb05a78d748fa630a59e7f5c0fc35dec88;hpb=309360dac02905354483371267f86fc0598c602d;p=Pman.Core diff --git a/SimpleExcel.php b/SimpleExcel.php index 484808cb..829a2b04 100644 --- a/SimpleExcel.php +++ b/SimpleExcel.php @@ -381,6 +381,9 @@ class Pman_Core_SimpleExcel extends Pman if (preg_match('/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/', $v)) { $dataFormat = 'date'; $format = empty($format) ? 'YYYY-MM-DD' : $format; + $ut_to_ed_diff = 86400 * 25569; + + $v = (strtotime($v) + $ut_to_ed_diff) / $format; } if ( (is_numeric($v) && strlen($v) > 1 && substr($v,0,1) == '0' && substr($v,1,1) != '.' )