Java tutorial
//package com.java2s; import java.util.Calendar; public class Main { public static Calendar getExpireTime(String expireSeconds) { return getExpireTime(Integer.parseInt(expireSeconds)); } public static Calendar getExpireTime(int expireSeconds) { Calendar c = Calendar.getInstance(); c.add(Calendar.SECOND, expireSeconds); return c; } }