Skip to content

Commit

Permalink
Merge pull request #1390 from futuretap/bugfix-issue-1388
Browse files Browse the repository at this point in the history
#1388: fix last_updated / last_reported
  • Loading branch information
hansmorb committed Dec 9, 2023
2 parents 005d216 + 5e5fbec commit f5d0a32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/API/GBFS/BaseRoute.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function get_items( $request ): WP_REST_Response {
$data = new stdClass();
$data->data = new stdClass();
$data->data->stations = $this->getItemData( $request );
$data->last_updated = current_time('timestamp');
$data->last_updated = current_time('timestamp', true);
$data->ttl = 60;
$data->version = "2.3";

Expand Down
2 changes: 1 addition & 1 deletion src/API/GBFS/StationStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function prepare_item_for_response( $item, $request ): stdClass {
$preparedItem->is_installed = true;
$preparedItem->is_renting = true;
$preparedItem->is_returning = true;
$preparedItem->last_reported = current_time('timestamp');
$preparedItem->last_reported = current_time('timestamp', true);

return $preparedItem;
}
Expand Down

0 comments on commit f5d0a32

Please sign in to comment.