private static void fixGPSTimeStamp(XMPNode exifSchema) throws XMPException {
  XMPNode gpsDateTime=XMPNodeUtils.findChildNode(exifSchema,"exif:GPSTimeStamp",false);
  if (gpsDateTime == null) {
    return;
  }
  try {
    XMPDateTime binGPSStamp;
    XMPDateTime binOtherDate;
    binGPSStamp=XMPUtils.convertToDate(gpsDateTime.getValue());
    if (binGPSStamp.getYear() != 0 || binGPSStamp.getMonth() != 0 || binGPSStamp.getDay() != 0) {
      return;
    }
    XMPNode otherDate=XMPNodeUtils.findChildNode(exifSchema,"exif:DateTimeOriginal",false);
    if (otherDate == null) {
      otherDate=XMPNodeUtils.findChildNode(exifSchema,"exif:DateTimeDigitized",false);
    }
    binOtherDate=XMPUtils.convertToDate(otherDate.getValue());
    Calendar cal=binGPSStamp.getCalendar();
    cal.set(Calendar.YEAR,binOtherDate.getYear());
    cal.set(Calendar.MONTH,binOtherDate.getMonth());
    cal.set(Calendar.DAY_OF_MONTH,binOtherDate.getDay());
    binGPSStamp=new XMPDateTimeImpl(cal);
    gpsDateTime.setValue(XMPUtils.convertFromDate(binGPSStamp));
  }
 catch (  XMPException e) {
    return;
  }
}

private static void fixGPSTimeStamp ( XMPNode exifSchema ) throws XMPException { XMPNode gpsDateTime = XMPNodeUtils . findChildNode ( exifSchema , "exif:GPSTimeStamp" , false ) ; if ( gpsDateTime == null ) { return ; } try { XMPDateTime binGPSStamp ; XMPDateTime binOtherDate ; binGPSStamp = XMPUtils . convertToDate ( gpsDateTime . getValue ( ) ) ; if ( binGPSStamp . getYear ( ) != 0 || binGPSStamp . getMonth ( ) != 0 || binGPSStamp . getDay ( ) != 0 ) { return ; } XMPNode otherDate = XMPNodeUtils . findChildNode ( exifSchema , "exif:DateTimeOriginal" , false ) ; if ( otherDate == null ) { otherDate = XMPNodeUtils . findChildNode ( exifSchema , "exif:DateTimeDigitized" , false ) ; } binOtherDate = XMPUtils . convertToDate ( otherDate . getValue ( ) ) ; Calendar cal = binGPSStamp . getCalendar ( ) ; cal . set ( Calendar . YEAR , binOtherDate . getYear ( ) ) ; cal . set ( Calendar . MONTH , binOtherDate . getMonth ( ) ) ; cal . set ( Calendar . DAY_OF_MONTH , binOtherDate . getDay ( ) ) ; binGPSStamp = new XMPDateTimeImpl ( cal ) ; gpsDateTime . setValue ( XMPUtils . convertFromDate ( binGPSStamp ) ) ; } catch ( XMPException e ) { return ; } }
fixes the gps timestamp in exif .
