// building a timestamp using default TimeZone. GregorianCalendar stamp = new GregorianCalendar(); stamp.clear(); stamp.set( year, month-1, day, hour, minute, second ); long timestamp = stamp.getTimeInMillis();