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

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

/**
 * Copyright (C) 2000-2020 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