|
From: <php...@li...> - 2007-05-12 07:18:44
|
Could someone suggest how to convert php timestamp to java timestamp?
This was how I created timestamp on php page
$startDate =3D new Java('java.sql.Timestamp', =
gmmktime(0,0,0,10,3,2007));
echo (String) $startDate;
$endDate =3D new Java('java.sql.Timestamp', time());
echo "<br>";
echo (String) $endDate;
The following timestamps displayed on the browser
1970-01-14 10:56:09.6
1970-01-14 07:29:12.32
And on the server sides, java stimestamp displayed=20
1970-01-14 10:56:09.6
1970-01-14 07:29:13.872
The year was 1970. =20
|