java.lang.Object
software.amazon.awssdk.enhanced.dynamodb.internal.converter.attribute.LocalTimeAttributeConverter
All Implemented Interfaces:
AttributeConverter<LocalTime>

@ThreadSafe @Immutable public final class LocalTimeAttributeConverter extends Object implements AttributeConverter<LocalTime>
A converter between LocalTime and AttributeValue.

This stores and reads values in DynamoDB as a String.

LocalTimes are stored in the official LocalTime format "HH:II:SS[.NNNNNNNNN]", where:

  1. H is a 2-character, zero-prefixed hour between 00 and 23
  2. I is a 2-character, zero-prefixed minute between 00 and 59
  3. S is a 2-character, zero-prefixed second between 00 and 59
  4. N is a 9-character, zero-prefixed nanosecond between 000,000,000 and 999,999,999. The . and N may be excluded if N is 0.
See LocalTime for more details on the serialization format.

This serialization is lexicographically orderable.

Examples:

  • LocalTime.of(5, 30, 0) is stored as an AttributeValue with the String "05:30"
  • LocalTime.of(5, 30, 0, 1) is stored as an AttributeValue with the String "05:30:00.000000001"

This can be created via create().