Is it possible to use an invariant culture to pass data using XML
Author: mmontealegre@commandalkon.com (mmontealegre)
We have a project where we are passing data to a reporting tool using XML. Currently our code sets the $nlslocale and does an xml save, like so $nlslocale = var_sNLSLocale xmlsave var_sFastReportXml, "DTD:DTDFROSCH.CMDSERIES" If you examine the variable you will see date/time fields are different if you change your nsllocale between US, Italian, Dutch, Finnish. Our problem is for Finnish in particular, although I suspect some other European countries might have similar problems. In Finnish the date looks like such (notice the periods in the time) <START_TIME.SCHD.CMDSERIES>27.3.2015 10.00.00</START_TIME.SCHD.CMDSERIES> According to windows it should be hh:mm:ss. So on the reports side it reads the windows setting and using C# code the ParseDate function will fail. According to Wikipedia, The 12-hour clock is used in the spoken language and idiomatic expressions. The 24-hour notation is used in writing, with a period as the standardized and recommended separator (e.g. “15.07” or “8.27”). However, colon is almost exclusively used instead of period in computing environments. The conventions are the same for Finnish and Swedish. Anyways I have two questions 1) Why is Uniface different than the windows setting? Is there some other library they use to determine these date formats. 2) What is the proper way to be doing this? In .net environments they expect you to use the CultureInfo.InvariantCulture to pass data around between two programs. You would still of course display the data in the proper culture format but passing it back and forth using XML should be in a generic format.




