Here you can find the source of getTimeFormat()
private static DateFormat getTimeFormat()
//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; } }