
org.sfm.utils.conv.time.JavaZonedDateTimeTojuDateConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sfm Show documentation
Show all versions of sfm Show documentation
Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.
package org.sfm.utils.conv.time;
import org.sfm.utils.conv.Converter;
import java.sql.Timestamp;
import java.time.ZonedDateTime;
import java.util.Date;
public class JavaZonedDateTimeTojuDateConverter implements Converter {
@Override
public Date convert(ZonedDateTime in) throws Exception {
if (in == null) return null;
return Date.from(in.toInstant());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy