Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
435
DateTimeInvalidLocalFormat Exception while saving calendar as XML
posted

When I save my calendar XML using the infra API using the following code line,

this.ultraCalendarInfo1.SaveAsXml(fileName, CalendarInfoCategories.All); 

I get this exception 

 

dateTimeInvalidLocalFormat Exception

"A UTC DateTime is being converted to text in a format that is only correct for local times. This can happen when calling DateTime.ToString using the 'z' format specifier, which will include a local time zone offset in the output. In that case, either use the 'Z' format specifier, which designates a UTC time, or use the 'o' format string, which is the recommended way to persist a DateTime in text. This can also occur when passing a DateTime to be serialized by XmlConvert or DataSet. If using XmlConvert.ToString, pass in XmlDateTimeSerializationMode.RoundtripKind to serialize correctly. If using DataSet, set the DateTimeMode on the DataColumn object to DataSetDateTime.Utc." 

Parents
No Data
Reply
  • 435
    posted

    The reason for posting here was that if someone from our peers have encountered this problem before he/she

    can help me. Let me try this Developer Support option also.

Children
No Data