Here you can find the source of getUnixTime()
public static long getUnixTime()
//package com.java2s; import java.util.Date; public class Main { public static long getUnixTime() { return (new Date()).getTime() / 1000; }//ww w . jav a2s .c om }