File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Linux / UNIX and the fly likes php(unix) timestamp to java.sql.Timestamp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "php(unix) timestamp to java.sql.Timestamp" Watch "php(unix) timestamp to java.sql.Timestamp" New topic
Author

php(unix) timestamp to java.sql.Timestamp

vu lee
Ranch Hand

Joined: Apr 19, 2005
Posts: 189
php time() returns current unix timestamp containing 10 digits which is not equivalent with java.sql.Timestamp containing 13 digits. To temporarily resolve the issue, I multiply unix timestamp by 1000.

What is the proper way to map unix timestamp to java timestamp?
Thanks
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

And unix-timestamp=php.timestamp or unix-timestamp=sql.Timestamp?

However - if your conversion is correct - do you guess there is a more accurate or faster solution than a multiplication by 1000?


http://home.arcor.de/hirnstrom/bewerbung
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: php(unix) timestamp to java.sql.Timestamp