Class MySqlValueConverters

All Implemented Interfaces:
ValueConverterProvider

@Immutable public class MySqlValueConverters extends BinlogValueConverters
MySQL-specific customization of the conversions from JDBC values obtained from the MySQL binlog client library.

This class always uses UTC for the default time zone when converting values without timezone information to values that require timezones. This is because MySQL TIMESTAMP values are always stored in UTC (unlike DATETIME values) and are replicated in this form. Meanwhile, the MySQL Binlog Client library will deserialize these as Timestamp values that have no timezone and, therefore, are presumed to be in UTC. When the column is properly marked with a Types.TIMESTAMP_WITH_TIMEZONE type, the converters will need to convert that Timestamp value into an OffsetDateTime using the default time zone, which always is UTC.

Author:
Randall Hauch