* or just unspecified. This class assumes that a time of zero means "unspecified". This will be
* revised after we implemented ISO 19108.</p>
*/
static XMLGregorianCalendar toXML(final Instant instant) {
if (instant != null) {
final Position position = instant.getPosition();
if (position != null) {
final Context context = Context.current();
try {
final XMLGregorianCalendar date = XmlUtilities.toXML(context, position.getDate());
if (date != null) {
XmlUtilities.trimTime(date, false);
return date;
}
} catch (DatatypeConfigurationException e) {