I've run into a problem where generating a Plist file using rust-plist formats the <date> tag in a way that XCode won't recognize. The expected output format is e.g.:
2016-11-09T23:25:56Z
but the actual output is:
2016-11-09T23:25:56+00:00
Note that the expected output uses "Z" at the end to specify that time is UTC, whereas the output rust-plist produces uses the "+hh:mm" format to specify an offset from UTC. Both are technically representing the same date, but XCode only seems to recognize the former. When a plist containing the latter is opened, XCode shows the following error:
Repro Steps
The following document can be used to test this issue:
The following snippet demonstrates how to reproduce the issue (will require minor tweaks to run on your system):
let file = File::open("path/to/test.plist").unwrap();
let plist = Plist::read(file).unwrap();
let out_file = File::create("path/to/out.plist").unwrap();
let event_writer = EventWriter::new(out_file);
for event in plist.into_events() {
event_writer.write(&event).unwrap();
}
I've run into a problem where generating a Plist file using
rust-plist
formats the<date>
tag in a way that XCode won't recognize. The expected output format is e.g.:but the actual output is:
Note that the expected output uses "Z" at the end to specify that time is UTC, whereas the output
rust-plist
produces uses the "+hh:mm" format to specify an offset from UTC. Both are technically representing the same date, but XCode only seems to recognize the former. When a plist containing the latter is opened, XCode shows the following error:Repro Steps
The following document can be used to test this issue:
The following snippet demonstrates how to reproduce the issue (will require minor tweaks to run on your system):