Java SQL Time getServerTime()

Here you can find the source of getServerTime()

Description

get Server Time

License

BSD License

Declaration

public static java.util.Date getServerTime() 

Method Source Code

//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());
    }
}

Related

  1. getIntervalDays(Date time1, Date time2)
  2. getJoinedSysDateTime()
  3. getLastTimeOfDay(Calendar calendar)
  4. getMaxModifyTime(String path)
  5. getMaxPollTime(final Connection jdbcConnection, final String tableName)
  6. getServerTimezone(Properties dbSettings)
  7. getSGWDateTime(long dateTime)
  8. getSQLDate(long datetime)
  9. getSQLDateTime()