diff --git a/internal/cmd/postgresflex/instance/clone/clone.go b/internal/cmd/postgresflex/instance/clone/clone.go index b05617b2..e20baa76 100644 --- a/internal/cmd/postgresflex/instance/clone/clone.go +++ b/internal/cmd/postgresflex/instance/clone/clone.go @@ -143,7 +143,7 @@ func parseInput(cmd *cobra.Command, inputArgs []string) (*inputModel, error) { Details: err.Error(), } } - recoveryTimestampString := recoveryTimestamp.String() + recoveryTimestampString := recoveryTimestamp.Format(time.RFC3339) return &inputModel{ GlobalFlagModel: globalFlags, diff --git a/internal/cmd/postgresflex/instance/clone/clone_test.go b/internal/cmd/postgresflex/instance/clone/clone_test.go index c61e50e4..04d0e2b6 100644 --- a/internal/cmd/postgresflex/instance/clone/clone_test.go +++ b/internal/cmd/postgresflex/instance/clone/clone_test.go @@ -91,7 +91,7 @@ func fixtureRequiredInputModel(mods ...func(model *inputModel)) *inputModel { if err != nil { return &inputModel{} } - recoveryTimestampString := testRecoveryTimestamp.String() + recoveryTimestampString := testRecoveryTimestamp.Format(time.RFC3339) model := &inputModel{ GlobalFlagModel: &globalflags.GlobalFlagModel{ @@ -111,7 +111,7 @@ func fixtureStandardInputModel(mods ...func(model *inputModel)) *inputModel { if err != nil { return &inputModel{} } - recoveryTimestampString := testRecoveryTimestamp.String() + recoveryTimestampString := testRecoveryTimestamp.Format(time.RFC3339) model := &inputModel{ GlobalFlagModel: &globalflags.GlobalFlagModel{ @@ -142,7 +142,7 @@ func fixturePayload(mods ...func(payload *postgresflex.CloneInstancePayload)) po if err != nil { return postgresflex.CloneInstancePayload{} } - recoveryTimestampString := testRecoveryTimestamp.String() + recoveryTimestampString := testRecoveryTimestamp.Format(time.RFC3339) payload := postgresflex.CloneInstancePayload{ Timestamp: utils.Ptr(recoveryTimestampString), @@ -350,7 +350,7 @@ func TestBuildRequest(t *testing.T) { if err != nil { return } - recoveryTimestampString := testRecoveryTimestamp.String() + recoveryTimestampString := testRecoveryTimestamp.Format(time.RFC3339) tests := []struct { description string