note 44097 deleted from function.mktime by tomsommer
| From: | tomsommer@php.net | Date: | Thu, 15 Jul 2004 07:27:36 +0000 |
| Subject: | note 44097 deleted from function.mktime by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-73262@lists.php.net to get a copy of this message | ||
Note Submitter: avilesedg@hotmail.com
----
This function is for convert Borland C++ Builder / Delphi TDateTime values to a UNIX timestamp.
---------------------------------------------------
function tdtToTmsp($t)
{
$t = $t;
$t = split("\.", $t);
$te = $t[0];
$tf = $t[1];
$h = "0.$tf" * 24;
$h = split("\.", $h);
$he = $h[0];
$hf = $h[1];
$h = $he;
$m = "0.$hf" * 60;
$m = split("\.", $m);
$me = $m[0];
$mf = $m[1];
$m = $me;
$s = "0.$mf" * 60;
$s = split("\.", $s);
$se = $s[0];
$sf = $s[1];
$s = $se;
$d = $te - 25569;
$d = mktime($h, $m, $s, 1, 1 + $d, 1970);
return $d;
}