Here you can find the source of translateStartTimeToRFC3339(String startTime)
public static String translateStartTimeToRFC3339(String startTime) throws ParseException
//package com.java2s; //License from project: Apache License import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.*; public class Main { public static String translateStartTimeToRFC3339(String startTime) throws ParseException { SimpleDateFormat srcParser = new SimpleDateFormat( "YYYY-MM-DD'T'HH:mm:ss'Z'"); SimpleDateFormat dstFormater = new SimpleDateFormat( "YYYY-MM-DD'T'HH:mm:ssXXX"); Date date = srcParser.parse(startTime); return dstFormater.format(date); }//from w ww. j a v a 2s .c o m }