Here you can find the source of getServerTime()
public static java.util.Date getServerTime()
//package com.java2s; /******************************************************************************* * Copyright Duke Comprehensive Cancer Center and SemanticBits * /* w w w .ja v a 2 s . c om*/ * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/c3pr/LICENSE.txt for details. ******************************************************************************/ import java.sql.Time; import java.util.Date; import java.util.GregorianCalendar; public class Main { public static java.util.Date getServerTime() { GregorianCalendar date = new GregorianCalendar(); return date.getTime(); } public static Time getTime(Date date) { return new Time(date.getTime()); } }