All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ldaptive.beans.spring.convert.ZonedDateTimeToStringConverter Maven / Gradle / Ivy

Go to download

Mapping, persistence, and code generation API for reading and writing POJOs to an LDAP directory

The newest version!
/* See LICENSE for licensing and NOTICE for copyright. */
package org.ldaptive.beans.spring.convert;

import java.time.ZonedDateTime;
import org.ldaptive.transcode.GeneralizedTimeValueTranscoder;
import org.springframework.core.convert.converter.Converter;

/**
 * Convert a {@link ZonedDateTime} to a String.
 *
 * @author  Middleware Services
 */
public class ZonedDateTimeToStringConverter implements Converter
{


  @Override
  public String convert(final ZonedDateTime t)
  {
    final GeneralizedTimeValueTranscoder transcoder = new GeneralizedTimeValueTranscoder();
    return transcoder.encodeStringValue(t);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy