Java Date UTC Parse getDateTimeUTC(int year, int month, int day, int hour, int minute, int second)

Here you can find the source of getDateTimeUTC(int year, int month, int day, int hour, int minute, int second)

Description

get Date Time UTC

License

Open Source License

Declaration

private static Calendar getDateTimeUTC(int year, int month, int day, int hour, int minute, int second) 

Method Source Code


//package com.java2s;
import java.util.Calendar;
import java.util.TimeZone;

public class Main {
    private static Calendar getDateTimeUTC(int year, int month, int day, int hour, int minute, int second) {
        Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
        cal.clear();//from w  w  w.  ja  v  a 2s .  co m
        cal.set(year, month, day, hour, minute, second);
        return cal;

    }
}

Related

  1. getLocalTimeFromUTC( String localTimeZoneId, java.util.Date utcTimestamp)
  2. getUTC(java.util.Date siteTimestamp)
  3. getUTCDate()
  4. getUTCDate()