diff --git a/TestComponents/Test.cs b/TestComponents/Test.cs index 64853bb..2378a7a 100644 --- a/TestComponents/Test.cs +++ b/TestComponents/Test.cs @@ -280,8 +280,17 @@ private static int getTestRow(string test, DataFrame allTests) if (row[0].ToString() == test) //if this date row holds data for current site { - DateTime date = DateTime.ParseExact(row[1].ToString(), "d/MM/yyyy", CultureInfo.InvariantCulture); - //DateTime date = (DateTime)row[1]; + DateTime date = new DateTime(); + if (Environment.GetEnvironmentVariable("GITHUB_WORKSPACE") != null) + { + //Need to parse date like this in GitHub + date = DateTime.ParseExact(row[1].ToString(), "d/MM/yyyy", CultureInfo.InvariantCulture); + } + else + { + //And need to do it like this locally + date = (DateTime)row[1]; + } DateTime last = new DateTime(); if (fert.Keys.Count > 0)