Get Unix Time in Java

return (int) (System.currentTimeMillis() / 1000L);