Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.annotation.SuppressLint;

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

public class Main {
    @SuppressLint("SimpleDateFormat")
    public static long parse_iso_time_string_to_long(String iso_time_string) throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat();
        sdf.applyPattern("yyyy-MM-dd'T'HH:mm:ssZ");
        return sdf.parse(iso_time_string).getTime();
    }
}