I’m having an issue with a Unit Test that fails in Cloud Build, but passes locally. The test calls DateTimeOffset.Parse(), with the parameter"26-10-2020 15:26:53 +01:00".
This test runs fine & passes locally, on multiple machines (running a mix of Windows & Linux), but in Cloud Build this throws System.FormatException : String was not recognized as a valid DateTime., failing the test, and preventing us from building.
Unity version: 2019.4.10f1
XCode version: 11.4.1
Source control: Git
Local build platform:
Build target: iOS, Android
edit: added additional info
Are you in a country with a sensible date format? I think the cloud build servers are in the United States of MMDDYY so it might be parsing your date as the 10th day of the 26th month 
1 Like
I am indeed in a country with a sensible date format :p. That is most likely the cause of it - faceplam moment. Thanks for the sanity check! 
Interestingly, being based in Denmark I rarely think of Unity as a US company, so I didn’t even consider that avenue.
No problem, I’ve been caught out with a similar issue on floating point formats. When one of our players was saving some game data on their device in France, I was using ‘ToString()’ to save the values and it was saving them in the local format with a comma separator - e.g.“45,123”.
If they changed their locale to the UK it will fail parsing that float value as it needs to be “45.123”. I ended up setting the app to use the invariant culture at startup so it always loads and saves using the period as the floating point separator.