Java tutorial
//package com.java2s; import java.util.Calendar; import java.util.TimeZone; public class Main { private static String getTimestamp() { Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC")); long secondsSince = calendar.getTimeInMillis() / 1000L; return "" + secondsSince; } }