After client downloads a file from our server with our app, the app does a ParseExact
on a date string which comes down from the server in the form: yyyy/mm/dd HH:mm:ss
.
After alot of confusion, I noticed in some logs that the date on the clients system was 19/7/2554
. As is turns out this is a valid time as in Thailand, Windows defaults to the Buddhist era time system, where it is the year 2554.
My parse exact is done with an invariant culture, which I suspect may be the problem, but I thought that the culture referred to the format which you were trying to parse?
The exception message I get is: String was not recognized as a valid DateTime
because the day of week was incorrect