Skip to content

Commit

Permalink
fixed issue with missing dtf attributes on output
Browse files Browse the repository at this point in the history
  • Loading branch information
scottbw committed Jan 5, 2012
1 parent fc31fc4 commit e4075cb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/org/xcri/types/TemporalType.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@ public void setDtf(Date dtf) {
public Element toXml() {
Element element = super.toXml();
Calendar dtf = Calendar.getInstance();
dtf.setTime(this.getDtf());
if (this.getDtf() != null) element.setAttribute("dtf", DatatypeConverter.printDateTime(dtf));
if (this.getDtf() != null){
dtf.setTime(this.getDtf());
element.setAttribute("dtf", DatatypeConverter.printDateTime(dtf));
}
return element;
}

Expand Down

0 comments on commit e4075cb

Please sign in to comment.