Java Milliseconds Parse parseGMTInMillis(String time)

Here you can find the source of parseGMTInMillis(String time)

Description

parse GMT In Millis

License

Open Source License

Declaration

public static long parseGMTInMillis(String time) throws ParseException 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;

public class Main {
    private static DateFormat GMT_FORMAT_MILLIS = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");

    public static long parseGMTInMillis(String time) throws ParseException {
        synchronized (GMT_FORMAT_MILLIS) {
            return GMT_FORMAT_MILLIS.parse(time).getTime() * 1000000L;
        }/*from   ww w.  j  a  v a 2  s.  co  m*/
    }
}

Related

  1. getTimeFromMilliseconds(long ms)
  2. getTimeInMilliseconds(String timeString)
  3. getTimeMillis(long FileTimestamp)
  4. getTimeMillis(String time)
  5. parseDate(long millisec)
  6. parseMillis(String s)
  7. parseMillisecond(String date)
  8. parseTimeSpanMillis(final String text)
  9. parseTimeStrToMilliseconds(String timeStr)