// package constructor, only called by Fields.
TimeField(OdfElement odfElement) {
TextSpanElement spanElement = ((OdfFileDom) odfElement.getOwnerDocument()).newOdfElement(TextSpanElement.class);
odfElement.appendChild(spanElement);
timeElement = spanElement.newTextTimeElement();
OdfNumberTimeStyle timeStyle = newTimeStyle();
String timeStyleName = timeStyle.getStyleNameAttribute();
timeStyle.buildFromFormat(DEFAULT_TIME_FORMAT);
timeStyle.setStyleNameAttribute(timeStyleName);
timeElement.setStyleDataStyleNameAttribute(timeStyle.getStyleNameAttribute());
Calendar calender = Calendar.getInstance();
SimpleDateFormat simpleFormat = new SimpleDateFormat(DEFAULT_TIME_VALUE_FORMAT);
Date time = calender.getTime();
String svalue = simpleFormat.format(time);
timeElement.setTextTimeValueAttribute(svalue);