Changeset 13042 in josm


Ignore:
Timestamp:
2017-10-27T00:37:48+02:00 (7 years ago)
Author:
Don-vip
Message:

fix #15488 - display SubSecTimeOriginal on picture's information overlay

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java

    r12639 r13042  
    1313import java.awt.event.WindowEvent;
    1414import java.text.DateFormat;
     15import java.text.SimpleDateFormat;
    1516
    1617import javax.swing.AbstractAction;
     
    335336            }
    336337            DateFormat dtf = DateUtils.getDateTimeFormat(DateFormat.SHORT, DateFormat.MEDIUM);
     338            // Make sure date/time format includes milliseconds
     339            if (dtf instanceof SimpleDateFormat) {
     340                String pattern = ((SimpleDateFormat) dtf).toPattern();
     341                if (!pattern.contains(".SSS")) {
     342                    dtf = new SimpleDateFormat(pattern.replace(":ss", ":ss.SSS"));
     343                }
     344            }
    337345            if (entry.hasExifTime()) {
    338346                osd.append(tr("\nEXIF time: {0}", dtf.format(entry.getExifTime())));
Note: See TracChangeset for help on using the changeset viewer.