Java Time Format getTimeFormat()

Here you can find the source of getTimeFormat()

Description

get Time Format

License

Open Source License

Declaration

private static DateFormat getTimeFormat() 

Method Source Code

//package com.java2s;
/**/*w ww .  ja  v  a2s.c o m*/
 * Logspace
 * Copyright (c) 2015 Indoqa Software Design und Beratung GmbH. All rights reserved.
 * This program and the accompanying materials are made available under the terms of
 * the Eclipse Public License Version 1.0, which accompanies this distribution and
 * is available at http://www.eclipse.org/legal/epl-v10.html.
 */

import java.text.DateFormat;

import java.text.SimpleDateFormat;

import java.util.TimeZone;

public class Main {
    private static final String ISO_8601_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";
    private static final String TIMEZONE_UTC = "UTC";

    private static DateFormat getTimeFormat() {
        DateFormat df = new SimpleDateFormat(ISO_8601_DATE_FORMAT);
        df.setTimeZone(TimeZone.getTimeZone(TIMEZONE_UTC));
        return df;
    }
}

Related

  1. getTimeAsString(String timeFormatAsString)
  2. getTimeByDate(Date date, String timeFormat)
  3. getTimeByFormat(Date date, String format)
  4. getTimeCount(String from, String to, String format)
  5. getTimeCount(String from, String to, String format)
  6. getTimeFormat()
  7. getTimeFormat()
  8. getTimeFormat(Date date, String strFormat)
  9. getTimeFormat(java.util.Date date)