[Bugfix] fixed writing time of TimeValue to XML

This commit is contained in:
Robert von Burg 2015-02-28 20:35:53 +01:00
parent a7de76933b
commit c0b9ac930e
1 changed files with 3 additions and 1 deletions

View File

@ -42,6 +42,7 @@ import li.strolch.model.timevalue.ITimeValue;
import li.strolch.model.timevalue.ITimeVariable;
import li.strolch.model.timevalue.IValue;
import ch.eitchnet.utils.helper.StringHelper;
import ch.eitchnet.utils.iso8601.ISO8601FormatFactory;
/**
* @author Robert von Burg <eitch@eitchnet.ch>
@ -86,7 +87,8 @@ public abstract class AbstractToSaxWriterVisitor {
for (ITimeValue<IValue<?>> timeValue : values) {
this.writer.writeEmptyElement(Tags.VALUE);
this.writer.writeAttribute(Tags.TIME, timeValue.getTime().toString());
this.writer.writeAttribute(Tags.TIME, ISO8601FormatFactory.getInstance()
.formatDate(timeValue.getTime()));
this.writer.writeAttribute(Tags.VALUE, timeValue.getValue().getValueAsString());
}