Sounds like your date attribute(s) might be localized. You can read about it here:. https://docs.mendix.com/refguide7/attributes#localize-only-for-the-date-and-time-attribute-type. If they are localized, a time that is 1 in the morning CET on June 1 would download as May 31.
The reason for this as other have already pointer out is a mix up of time zones. Excel always uses timezone from java which is either
1) the java runtime timezone (prior to Mendix8)
2) Common Locale Data Repository (Mx8+)
This is not related to the date time attributes and whether or not they are localized.
Depending on where your server is hosted e.g Europe vs US this can lead to different outcomes.This is a bug in the platform. To work around this you can add a helper string attribute that holds the date formatted as a string using formatDateTimeUTC. However, the date will no longer be recognized by excel as a date which loses the ability to do sorting.
-Andrej
Thank you very much for your help guys!