class MySQLTimestamp2BinlogProtocolValue implements MySQLBinlogProtocolValue {

    @Override
    public Serializable read(final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload) {
        int seconds = payload.getByteBuf().readInt();
        if (0 == seconds) {
            return MySQLTimeValueUtil.DATETIME_OF_ZERO;
        }
        String result = MySQLTimeValueUtil.getSimpleDateFormat().format(new Timestamp(seconds * 1000L));
        return columnDef.getColumnMeta() > 0 ? result + new MySQLFractionalSeconds(columnDef.getColumnMeta(), payload) : result;
    }

}