Class UTCDateNormalizer
java.lang.Object
com.broadleafcommerce.dataimport.service.normalizer.UTCDateNormalizer
- All Implemented Interfaces:
ImportDataNormalizer
This data normalizer is used to convert the date to UTC. The date must be in the format
DateTimeFormatter.ISO_ZONED_DATE_TIME
or DateTimeFormatter.ISO_DATE_TIME
otherwise, it is skipped. For example:
- "2020-06-23T04:00:00-04:00[America/New_York]" -> "2020-06-23T08:00:00Z"
- "2020-06-23T04:00:00-04:00" -> "2020-06-23T08:00:00Z"
- "2020-06-23T04:00:00Z" -> "2020-06-23T04:00:00Z"
- "2020-06-23T04:00:00" -> "2020-06-23T04:00:00Z"
- Author:
- Dima Myroniuk (dmyroniuk)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionThe list of header names to normalize.void
Normalizes data under certain headers fromImportDataNormalizer.getHeaderNamesToNormalize()
.
-
Constructor Details
-
UTCDateNormalizer
-
-
Method Details
-
normalize
Description copied from interface:ImportDataNormalizer
Normalizes data under certain headers fromImportDataNormalizer.getHeaderNamesToNormalize()
.- Specified by:
normalize
in interfaceImportDataNormalizer
- Parameters:
row
- the row of data parsed out from the file
-
getHeaderNamesToNormalize
Description copied from interface:ImportDataNormalizer
The list of header names to normalize. This list is used to retrieve the value from the row map.- Specified by:
getHeaderNamesToNormalize
in interfaceImportDataNormalizer
- Returns:
- the list of header names to normalize
-