Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions internal/server/postgres/dataserverimpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,8 @@ func (s *DataPlatformDataServiceServerImpl) GetForecastAtTimestamp(
Longitude: value.Longitude,
},
Metadata: value.Metadata,
InitializationTimestampUtc: timestamppb.New(value.InitTimeUtc.Time),
CreatedTimestampUtc: timestamppb.New(value.CreatedAtUtc.Time),
}
}

Expand Down
2 changes: 2 additions & 0 deletions internal/server/postgres/dataserverimpl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,8 @@ func TestGetForecastAtTimestamp(t *testing.T) {

for i, forecast := range resp.Values {
require.Equal(t, tc.expectedp50s[i], forecast.ValueFraction)
require.NotNil(t, forecast.InitializationTimestampUtc)
require.NotNil(t, forecast.CreatedTimestampUtc)
}
}
})
Expand Down
2 changes: 2 additions & 0 deletions proto/ocf/dp/dp-data.messages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ message GetForecastAtTimestampResponse {
uint64 effective_capacity_watts = 4;
LatLng latlng = 5;
google.protobuf.Struct metadata = 6;
google.protobuf.Timestamp initialization_timestamp_utc = 7;
google.protobuf.Timestamp created_timestamp_utc = 8;
}

google.protobuf.Timestamp timestamp_utc = 1;
Expand Down
Loading