Android GMT Date Get getMillisGMT()

Here you can find the source of getMillisGMT()

Description

get Millis GMT

License

Open Source License

Declaration

public static long getMillisGMT() 

Method Source Code

//package com.java2s;

import java.util.Calendar;

import java.util.GregorianCalendar;

import java.util.TimeZone;

public class Main {
    /**//from w w w. j  a  va  2 s. co m
     * 
     * @return
     */
    public static long getMillisGMT() {
        Calendar calendar = new GregorianCalendar();
        TimeZone mTimeZone = calendar.getTimeZone();
        int offset = mTimeZone.getOffset(System.currentTimeMillis());
        return System.currentTimeMillis() - offset;
    }
}

Related

  1. getGMTDate()
  2. getGMTDate(Date date)
  3. getGMTDateFromString(String dateStr)
  4. millisToGMT(long millis)