if you look at The System class in the java API, heres the method you could use to get raw time
currentTimeMillis
public static long currentTimeMillis()Returns the current time in milliseconds. Note that while the unit of time of the return value is a millisecond, the granularity of the value depends on the underlying operating system and may be larger. For example, many operating systems measure time in units of tens of milliseconds.
See the description of the class Date for a discussion of slight discrepancies that may arise between "computer time" and coordinated universal time (UTC).
Returns:
the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.
So what if it's in an int instead of a long?
int timestamp = 136787885;
Date date = new Date(timestamp);
You should not be storing a raw timestamp in an int variable.
The maximum value of int is 2^31-1. So your clock already wraps around after 2,147,483,647 milliseconds = 35,791.35 minutes = 596.5 hours = 24.8 days.
Your clock won't be able to go past January, 1970 if you store the raw timestamp in an int.