Changeset 17910 in josm for trunk/src/org
- Timestamp:
- 2021-05-24T12:13:56+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r17880 r17910 29 29 import java.text.SimpleDateFormat; 30 30 import java.time.Instant; 31 import java.time.ZoneOffset;32 import java.time.format.DateTimeFormatter;33 import java.time.format.FormatStyle;34 31 import java.util.ArrayList; 35 32 import java.util.Arrays; 36 33 import java.util.Collections; 37 34 import java.util.Comparator; 35 import java.util.Date; 38 36 import java.util.Dictionary; 39 37 import java.util.Hashtable; … … 598 596 } 599 597 598 private SimpleDateFormat getDateTimeFormat() { 599 return (SimpleDateFormat) DateUtils.getDateTimeFormat(DateFormat.SHORT, DateFormat.MEDIUM); 600 } 601 600 602 @Override 601 603 public void actionPerformed(ActionEvent e) { 602 SimpleDateFormat dateFormat = (SimpleDateFormat) DateUtils.getDateTimeFormat(DateFormat.SHORT, DateFormat.MEDIUM);604 SimpleDateFormat dateFormat = getDateTimeFormat(); 603 605 604 606 JPanel panel = new JPanel(new BorderLayout()); … … 773 775 Instant date = img.getExifInstant(); 774 776 if (date != null) { 775 Date TimeFormatter df = DateUtils.getDateTimeFormatter(FormatStyle.SHORT, FormatStyle.MEDIUM)776 .withZone(ZoneOffset.UTC); // EXIF data does not contain timezone information and is read as UTC777 lbExifTime.setText(df.format( date));778 tfGpsTime.setText(df.format( date));777 DateFormat df = getDateTimeFormat(); 778 df.setTimeZone(DateUtils.UTC); // EXIF data does not contain timezone information and is read as UTC 779 lbExifTime.setText(df.format(Date.from(date))); 780 tfGpsTime.setText(df.format(Date.from(date))); 779 781 tfGpsTime.setCaretPosition(tfGpsTime.getText().length()); 780 782 tfGpsTime.setEnabled(true);
Note:
See TracChangeset
for help on using the changeset viewer.