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

com.gitee.maskit.utils.ResponseTimestampStringConverter Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
package com.gitee.maskit.utils;

import com.fasterxml.jackson.databind.util.StdConverter;

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

public class ResponseTimestampStringConverter extends StdConverter {
    static final SimpleDateFormat FORMAT = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss.SSSZZZZZ", Locale.ENGLISH);

    public String convert(Date value) {
        return "" + (null != value ? value : new Date()).getTime();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy