1.3Version

This commit is contained in:
Lucio Maranta
2019-10-16 09:44:55 +02:00
parent a6d0118f57
commit 95a6d19cb1
6 changed files with 9 additions and 12 deletions
+5 -2
View File
@@ -356,7 +356,10 @@ namespace Step.Config
PhoneNumber = x.Element("phoneNumber").Value
})
.FirstOrDefault();
var ci = new CultureInfo("en-US");
var formats = new[] { "M-d-yyyy HH:mm", "dd-MM-yyyy HH:mm", "MM-dd-yyyy HH:mm", "M/d/yyyy HH:mm", "dd/MM/yyyy HH:mm", "MM/dd/yyyy HH:mm" }
.ToArray();
MaintenancesConfig = xmlConfigFile
.Descendants("maintenances")
@@ -369,7 +372,7 @@ namespace Step.Config
y => y.Attribute("langKey").Value, y => y.Value
),
Intervall = TimeSpan.FromMinutes(Convert.ToDouble(x.Element("interval").Value)),
Deadline = DateTime.Parse(x.Element("deadline").Value),
Deadline = DateTime.ParseExact(x.Element("deadline").Value, formats, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal),
Type = x.Element("type").Value,
CouterId = Convert.ToInt32(x.Element("counterId").Value),
LocalizedDescription = x.Element("localizedDescription").Elements().ToDictionary( // Read localization of description