Java tutorial
//package com.java2s; import java.util.Calendar; import java.util.Date; public class Main { /** * Returns Epoch date, ie. 01/01/1970. * * @return Epoch date, ie. 01/01/1970. */ public static Date getEpoch() { final Calendar calendar = Calendar.getInstance(); calendar.clear(); calendar.set(1970, 0, 1); return calendar.getTime(); } }