Here you can find the source of getIso8601DateFormat()
public static SimpleDateFormat getIso8601DateFormat()
//package com.java2s; /**//w ww. ja v a 2 s .c o m * Copyright (c) 2008-2011, Open & Green Inc. * All rights reserved. * info@gaoshin.com * * This version of SORMA is licensed under the terms of the Open Source GPL 3.0 license. http://www.gnu.org/licenses/gpl.html. Alternate Licenses are available. * * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, * AND NON-INFRINGEMENT OF THIRD-PARTY INTELLECTUAL PROPERTY RIGHTS. * See the GNU General Public License for more details. * */ import java.text.SimpleDateFormat; import java.util.TimeZone; public class Main { public static SimpleDateFormat getIso8601DateFormat() { final SimpleDateFormat ISO8601UTC = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");// 24 // characters ISO8601UTC.setTimeZone(TimeZone.getTimeZone("UTC")); // UTC == GMT return ISO8601UTC; } }