Mendix 5.7.0 and iCalendar module

0
Upgrading to the just released v5.7.0 of the modeler, I get a compilation error that a library used in the iCalendar module (used to send out appointments) no longer exists - com.mendix.connectionbus.connections.jdbc.implementations.hsqldb.DateTimeLocalizationConverter ' [javac] D:\Mendix5\eServiceSuite\javasource\sales\actions\Appointment_SendNotification.java:49: error: package com.mendix.connectionbus.connections.jdbc.implementations.hsqldb does not exist ' Is there a replacement library to replace this one?
asked
2 answers
1

It seems that this class is only referenced in an 'import' statement in the file Appointment_SendNotification.java and that is it not actually used. You can try to remove this line and see if the application will start successfully.

answered
0

This is not a library but internal code of the Mendix platform. It's still there but no longer exposed by the platform (as was probably the intention but I'm not sure of that, I'll try to figure this out.)

However, it's an extremely trivial utility class and if you need the old behavior, the code looks like this:

package com.mendix.connectionbus.connections.jdbc.implementations.hsqldb;

import java.sql.Timestamp;
import java.util.TimeZone;

/**
 * This class contains one method, which converts a timestamp to another timestamp
 * localized with another time zone. 
 * 
 */
public class DateTimeLocalizationConverter {
    public static Timestamp convertToLocalDateTime(Timestamp timestamp, String timeZoneId) {
        if(timestamp == null)
            return timestamp;

        return new Timestamp(timestamp.getTime() + TimeZone.getTimeZone(timeZoneId).getOffset(timestamp.getTime()));
    }
}
answered