Here you can find the source of formatDateTime(String value)
public static String formatDateTime(String value)
//package com.java2s; //License from project: Open Source License public class Main { private static final int DATE_TIME_STRING_LENGTH = 29; private static final String GMT_OFFSET = ".000-00:00"; public static String formatDateTime(String value) { if (value == null) { return null; }/*from w w w.j a va2 s .com*/ if (value.length() != DATE_TIME_STRING_LENGTH) { return addGMToffset(value); } else { return value; } } private static String addGMToffset(String value) { return value + GMT_OFFSET; } }