-
- All Implemented Interfaces:
-
org.springframework.core.convert.converter.Converter
@ReadingConverter() public final class StringToOffsetDateTimeConverter implements Converter<String, OffsetDateTime>
A converter that converts from String to OffsetDateTime.
It uses DateTimeFormatter.ISO_OFFSET_DATE_TIME by default.
It is possible to modify the default behavior by instantiating the converter with a specific DateTimeFormatter.
-
-
Constructor Summary
Constructors Constructor Description StringToOffsetDateTimeConverter(DateTimeFormatter dateTimeFormatter)
-
Method Summary
Modifier and Type Method Description OffsetDateTime
convert(String source)
Converts the given String to OffsetDateTime. -
-
Constructor Detail
-
StringToOffsetDateTimeConverter
StringToOffsetDateTimeConverter(DateTimeFormatter dateTimeFormatter)
- Parameters:
dateTimeFormatter
- the formatter to be used while converting.
-
-
Method Detail
-
convert
OffsetDateTime convert(String source)
Converts the given String to OffsetDateTime.
- Parameters:
source
- String to be converted
-
-
-
-