Skip to content

Commit

Permalink
fix timestamp format in ratio/groupBy/boundary endpoint, closes #318
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrasd committed Nov 23, 2023
1 parent 88b7167 commit a068031
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ Changelog

## 1.11.0-SNAPSHOT (current master)

### Bug Fixes
* Fix inconsistent timestamp format in `/elements/(aggregation)/ratio/groupBy/boundary` request responses ([#318])

[#318]: https://github.com/GIScience/ohsome-api/issues/318


## 1.10.1

* Fix performance degradation in previous release (version 1.10.0) which made data extractions very slow for medium to large query areas ([oshdb#516])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,8 @@ public static <P extends Geometry & Polygonal> Response aggregateBasicFiltersRat
if (!timeArrayFilled) {
String time = innerEntry.getKey().getFirstIndex().toString();
if (matchesBothCount == 0 || !timeArray[timeArrayCount - 1].equals(time)) {
timeArray[timeArrayCount] = innerEntry.getKey().getFirstIndex().toString();
timeArray[timeArrayCount] = TimestampFormatter.getInstance().isoDateTime(
innerEntry.getKey().getFirstIndex());
timeArrayCount++;
}
}
Expand Down Expand Up @@ -1085,7 +1086,8 @@ public static <P extends Geometry & Polygonal> Response aggregateRatioGroupByBou
if (!timeArrayFilled) {
String time = innerEntry.getKey().getFirstIndex().toString();
if (matchesBothCount == 0 || !timeArray[timeArrayCount - 1].equals(time)) {
timeArray[timeArrayCount] = innerEntry.getKey().getFirstIndex().toString();
timeArray[timeArrayCount] = TimestampFormatter.getInstance().isoDateTime(
innerEntry.getKey().getFirstIndex());
timeArrayCount++;
}
}
Expand Down

0 comments on commit a068031

Please sign in to comment.