When importing a datetime with the flat file importer the convertion from string to datetime is done with the UTC timezone.
If you want to change this open the shared.java class and look for the method convertDateStr.
Add the following line after :
SimpleDateFormat dateFormat = new SimpleDateFormat(sdf);
If you want to create a configurable timezone, some more work would be involved, but seems quite feasible.
Hope this helps in your specific case.
One way to handle this could be to use the 'parse with' option in the excel importer, and create a custom microflow containing some logic to set it to the relevant timezone.
(Just make sure you adjust for daylight saving time)
Yes this was my original thought but it seems that Mendix always presumes that the value being imported is UTC before any parsing in the flat file importer. As such, I always have the wrong baseline which means I think I’m going to have to maintain a calendar that I can reference.
i.e. I import a day light saving time which is assumed UTC at which point I use ‘formatDateTime’ function on this date and it converts incorrectly because the UTC is actually BST so I get BST + 1 rather than UTC + 1.