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 DateFormat getISO8601DateFormat() 

Method Source Code


//package com.java2s;
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

import java.text.DateFormat;
import java.text.SimpleDateFormat;

import java.util.TimeZone;

public class Main {
    public static final String ISO8601_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm'Z'";
    public static final TimeZone UTC = TimeZone.getTimeZone("UTC");

    public static DateFormat getISO8601DateFormat() {
        DateFormat dateFormat = new SimpleDateFormat(ISO8601_DATE_FORMAT);
        dateFormat.setTimeZone(UTC);/*  ww w . j  a v a2 s .c  o m*/
        return dateFormat;
    }
}

Related

  1. getISO8601Date(final Date date)
  2. getISO8601Date(long millis)
  3. getIso8601DateFormat()
  4. getIso8601DateFormat()
  5. getIso8601DateFormat()
  6. getIso8601DateFormat()
  7. getISO8601DateFormat(TimeZone tz, String mask)
  8. getISO8601DateString(Date d)
  9. getIso8601DateString(long timestampWithMilliseconds)