From 4f2901cbd78e21ea6951e2c2b1afec115677a6cd Mon Sep 17 00:00:00 2001 From: Peter Dudfield Date: Mon, 23 Mar 2026 18:55:03 +0000 Subject: [PATCH 1/2] feat(forecast-timestamp): add init and creation to GetForecastAtTimestamp --- internal/server/postgres/dataserverimpl.go | 2 ++ proto/ocf/dp/dp-data.messages.proto | 2 ++ 2 files changed, 4 insertions(+) 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/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; From bf107e86b42598d29c26058093b6898c3fc05f5a Mon Sep 17 00:00:00 2001 From: Peter Dudfield Date: Mon, 23 Mar 2026 19:09:14 +0000 Subject: [PATCH 2/2] test(add): new check --- internal/server/postgres/dataserverimpl_test.go | 2 ++ 1 file changed, 2 insertions(+) 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) } } })