diff --git a/internal/server/postgres/dataserverimpl.go b/internal/server/postgres/dataserverimpl.go index d9cf6d3..a1b5757 100644 --- a/internal/server/postgres/dataserverimpl.go +++ b/internal/server/postgres/dataserverimpl.go @@ -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), } } diff --git a/internal/server/postgres/dataserverimpl_test.go b/internal/server/postgres/dataserverimpl_test.go index a57aceb..7acaead 100644 --- a/internal/server/postgres/dataserverimpl_test.go +++ b/internal/server/postgres/dataserverimpl_test.go @@ -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) } } }) diff --git a/proto/ocf/dp/dp-data.messages.proto b/proto/ocf/dp/dp-data.messages.proto index 0b9774b..65c84d7 100644 --- a/proto/ocf/dp/dp-data.messages.proto +++ b/proto/ocf/dp/dp-data.messages.proto @@ -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;