Changeset 17715 in josm for trunk/src/org/openstreetmap/josm/gui/layer/gpx/DateFilterPanel.java
- Timestamp:
- 2021-04-08T22:56:06+02:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/gpx/DateFilterPanel.java
r16553 r17715 7 7 import java.awt.GridBagLayout; 8 8 import java.awt.event.ActionListener; 9 import java.time.Instant; 9 10 import java.time.ZoneId; 10 11 import java.time.ZonedDateTime; … … 52 53 53 54 final Date startTime, endTime; 54 Date[] bounds = layer.data.getMinMaxTimeForAllTracks(); 55 startTime = (bounds.length == 0) ? Date.from(ZonedDateTime.of(2000, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()).toInstant()) : bounds[0]; 56 endTime = (bounds.length == 0) ? new Date() : bounds[1]; 55 Instant[] bounds = layer.data.getMinMaxTimeForAllTracks(); 56 if (bounds.length == 0) { 57 startTime = Date.from(ZonedDateTime.of(2000, 1, 1, 0, 0, 0, 0, ZoneId.systemDefault()).toInstant()); 58 endTime = new Date(); 59 } else { 60 startTime = Date.from(bounds[0]); 61 endTime = Date.from(bounds[1]); 62 } 57 63 58 64 dateFrom.setDate(startTime);
Note:
See TracChangeset
for help on using the changeset viewer.