Jul 09, 2020 12:48 AM|PaulTheSmith|LINK
MySqlDateTime overrides the ToString method. I think there may be a difference between the base MySql version numbers and the MySql/Connector version numbers.
There was a change in the MySqlDateTime.ToString method between versions 8.0.16 (March 8, 2019) and 8.0.17 (June 25, 2019) which would affect your code. In the ToString() method a .Net DateTime variable is created (in a temp variable called d) and then
the .Net ToString() method is called and the results returned. In 8.0.17 (and all prior versions that I looked at) this is done like this (in the case that there is no time component)
which hard codes using the "Short Date" format of the CurrentCulture. From V8.0.17 onwards the code is
which gives you your problem.
My suggestion is that instead of doing
that you take control and use
and make sure that the CurrentCulture is set appropriately for your users. (the GetDateTime() method constructs a .Net DateTime structure and returns it)
(there seem to be other problems within MySqlDateTime.ToString() which uses a hodge podge ot InvariantCulture, CurrentCulture and CurrentUICulture - probably best to avoid it altogether)