Class UTCDateNormalizer

java.lang.Object
com.broadleafcommerce.dataimport.service.normalizer.UTCDateNormalizer
All Implemented Interfaces:
ImportDataNormalizer

public class UTCDateNormalizer extends Object implements 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)