I want to convert this
Timestamp stamp = new Timestamp(1416990366);
System.out.println("TimeStamp: " + stamp.toString());
Date mDate = new Date(stamp.getTime());
Sat Jan 17 13:06:30 GMT+03:30 1970
Wed, 26 Nov 2014 08:26:06 GMT
Timestamp stamp = new Timestamp(1000 * mIssue.getReleaseTime());
mIssue.getReleaseTime() = 1416990366
The time specified to the
Timestamp constructor is the time in milliseconds since January 1, 1970, 00:00:00 GMT.
1416990366 evaluates to around 16 days from that epoch, hence the output that you're getting.
If you want the current time, you can pass
System.currentTimeMillis() to the constructor.
Since the time that is obtained from the server is in milliseconds, you can multiply by 1000 and convert to
long as follows:
Timestamp stamp = new Timestamp((long) 1000 * mIssue.getReleaseTime());