package common.utility;


import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Locale;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.util.ISO8601DateFormat;

public class ISODateTimeMapper extends ObjectMapper {
	  /**
	 * 
	 */
	private static final long serialVersionUID = 2175331925440728383L;

	public ISODateTimeMapper() {
	        //super();
	        configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
	        //configure(SerializationFeature.WRITE_DATES_WITH_ZONE_ID, false);
	        //configure(SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS, false);
	        //final DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss", Locale.ITALY);//new SimpleDateFormat("yyyy-MM-dd'T'HH:mmZ");
	        //final DateFormat df = new SimpleDateFormat("EEE MMM dd yyyy hh:mm:ss Z", Locale.US);
	        //final DateFormat df = new SimpleDateFormat(new ISO8601DateFormat(), Locale.US);
	        
	        
	        setDateFormat(new ISO8601DateFormat());

	       
	    }
	
}

