Here you can find the source of convertIso8601FormatToArsTime(String timeString)
public static String convertIso8601FormatToArsTime(String timeString) throws ParseException
//package com.java2s; //License from project: BSD License import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class Main { private static final SimpleDateFormat iso8601DateTimeFormatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); /** Converts a string in ISO8601 Format into the string corresponding to an Ars internal time representation */ public static String convertIso8601FormatToArsTime(String timeString) throws ParseException { Date date = iso8601DateTimeFormatter.parse(timeString); int secondsSinceEpoch = (int) (date.getTime() / 1000); return String.valueOf(secondsSinceEpoch); }// ww w .j a v a2 s . c o m }