First check if, when you switch ‘myDateTimeAttribute’ to localized in Mendix, that your tests shows
'attribute is a LOCALIZED date'
But if that proves to be correct, I expect this to show a bug in Mendix in the passing of any date-attribute to widgets. Might want to open a ticket to Mendix for it, if this is reproducable.