Possible Bug? A datetime is set differently if called by a Microflow directly in the modeler vs if a Java Action calls that same Microflow

2
If I had infinite time I would flesh this out further but I’m going to post here in hopes that Mendix checks this out. I used the CSV Importer and in the MF that gets called, I set a DateTime to BeginOfCurrentDay. If I use the default or the UTC version, the result is always UTC time with the Session time matching exactly with a -0 offset. If I do the exact same thing as a scheduled event or if I push a button, the BeginOfCurrentDay and BeginOfCurrentDayUTC are different and correct as expected. It’s as if the Java Action assumes the Session Time is UTC time. I didn’t have time to recreate this in an earlier modeler version to see if it is consistent. I did notice that the JodaTime jar wasn’t in the modeler defaults anymore (v8.0). May or may not be related.
asked
3 answers
3

Do you have the “Use system context” option set to “true” in “Import CSV”?

It maybe you need to change this to “false” so it uses your context when it runs your microflow.

answered
0

Replace the Java date time operations evaluateExpression stuff, as it does differ

        com.mendix.core.Core.evaluateExpression(
            somecontext,
            {
            },
            "[%CurrentDateTime%]"//begin day or whatever other date ops
        )

 

answered
0

Is there a timezone set for ScheduledEvents, application and/or user?  who hits the button?

Also, my own defined best practice is always non-localize a DateTime attribute. as opposite of the default setting for DT attributes. I only localize it if the Timezone needs to be taken into account (which is often not the case) 

 

answered