All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.atomikos.util.DateHelper Maven / Gradle / Ivy

There is a newer version: 6.0.0
Show newest version
/**
 * Copyright (C) 2000-2019 Atomikos 
 *
 * LICENSE CONDITIONS
 *
 * See http://www.atomikos.com/Main/WhichLicenseApplies for details.
 */

package com.atomikos.util;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateHelper {

	private static ThreadLocal threadSafeSimpleDateFormat = new ThreadLocal() {
		protected SimpleDateFormat initialValue() {

			return new SimpleDateFormat("yyyy.MM.dd HH:mm:ss:SSS");

		};

	};

	public static String format(Date date) {
		return threadSafeSimpleDateFormat.get().format(date);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy