Java Date Convert convertsDateToGMTTimezone(Date date)

Here you can find the source of convertsDateToGMTTimezone(Date date)

Description

converts Date To GMT Timezone

License

Apache License

Declaration

public static Date convertsDateToGMTTimezone(Date date) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Calendar;
import java.util.Date;

import java.util.TimeZone;

public class Main {
    public static Date convertsDateToGMTTimezone(Date date) {
        Calendar calGMT = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
        calGMT.setTime(date);/*from   w w  w  .  j av  a 2 s .  com*/
        return calGMT.getTime();
    }
}

Related

  1. convertIntToDate(final int iDate)
  2. convertIntToDate(final int iDate, final StringBuilder verbatimDate)
  3. convertLocalDateToUTCDate(Date localDate)
  4. convertLocalToGMT(int[] dateTime)
  5. convertLocalToTimezone(Date original, String targetTimezoneId)
  6. convertSistemDependentDateToDesiredTimeZone(final Date sistemDependentDate, TimeZone desiredTimeZone)
  7. convertStringToDate(String date)
  8. convertStringToDate(String date)
  9. convertStringToDate(String string)