Java Date Format ISO getIso8601DateFormat()

Here you can find the source of getIso8601DateFormat()

Description

get Iso Date Format

License

Open Source License

Declaration

public static SimpleDateFormat getIso8601DateFormat() 

Method Source Code

//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;
    }
}

Related

  1. getDateAsISOString(Date date)
  2. getFormattedMillisolString(double s)
  3. getIso8601(final Date date)
  4. getISO8601Date(final Date date)
  5. getISO8601Date(long millis)
  6. getIso8601DateFormat()
  7. getIso8601DateFormat()
  8. getISO8601DateFormat()
  9. getIso8601DateFormat()