# addTimeConverters static method

void addTimeConverters(

1. ConverterRegistry registry

)

Add time-related converters.

## Implementation

    static void addTimeConverters(ConverterRegistry registry) {
      // String to time object converters
      registry.addConverter(StringToDateTimeConverter());
      registry.addConverter(StringToLocalDateTimeConverter());
      registry.addConverter(StringToLocalDateConverter());
      registry.addConverter(StringToLocalTimeConverter());
      registry.addConverter(StringToZoneIdConverter());
      registry.addConverter(StringToDurationConverter());

      // Time object to string converters
      registry.addConverter(DateTimeToStringConverter());
      registry.addConverter(LocalDateTimeToStringConverter());
      registry.addConverter(LocalDateToStringConverter());
      registry.addConverter(LocalTimeToStringConverter());
      registry.addConverter(LocalTimeToStringConverter());
      registry.addConverter(ZonedDateTimeToStringConverter());
      registry.addConverter(DurationToStringConverter());

      // DateTime cross-conversions
      registry.addConverter(DateTimeToLocalDateTimeConverter());
      registry.addConverter(LocalDateTimeToDateTimeConverter());
      registry.addConverter(DateTimeToLocalDateConverter());
      registry.addConverter(LocalDateToDateTimeConverter());
      registry.addConverter(DateTimeToLocalTimeConverter());
      registry.addConverter(DateTimeToZonedDateTimeConverter());
      registry.addConverter(ZonedDateTimeToDateTimeConverter());

      // Epoch milliseconds converters
      registry.addConverter(IntToDateTimeConverter());
      registry.addConverter(DateTimeToIntConverter());
      registry.addConverter(IntToZonedDateTimeConverter(defaultZone));
      registry.addConverter(ZonedDateTimeToIntConverter());
      registry.addConverter(IntToDurationConverter());
      registry.addConverter(DurationToIntConverter());

      // Cross-type converters
      registry.addConverter(LocalDateTimeToLocalDateConverter());
      registry.addConverter(LocalDateTimeToLocalTimeConverter());
      registry.addConverter(LocalDateAndLocalTimeToLocalDateTimeConverter());
      registry.addConverter(LocalDateTimeToZonedDateTimeConverter(defaultZone));
      registry.addConverter(ZonedDateTimeToLocalDateTimeConverter());
      registry.addConverter(ZonedDateTimeToLocalDateConverter());
      registry.addConverter(ZonedDateTimeToLocalTimeConverter());
      registry.addConverter(ZonedDateTimeToZoneIdConverter());
    }