From 3f8458b948bcca2e5a2f70612fd6af5c0e41ba60 Mon Sep 17 00:00:00 2001 From: Mrunal Patekar Date: Wed, 29 Oct 2025 13:55:46 -0700 Subject: [PATCH 1/2] update parameterToString --- isp/convenience.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/isp/convenience.go b/isp/convenience.go index f326e87..ad2e8be 100644 --- a/isp/convenience.go +++ b/isp/convenience.go @@ -9,6 +9,7 @@ import ( "net/http/httputil" "net/url" "reflect" + "time" link "github.com/tent/http-link-go" "golang.org/x/oauth2/clientcredentials" @@ -246,5 +247,16 @@ func NewWithAuthHeader(header string) *HighLevelClient { // TODO: remove this... for some reason it is missing in the generated output. // At some point we need to switch to a less wonky code generator. func parameterToString(v interface{}, s string) string { - return fmt.Sprintf("%v", v) + // Special-case time.Time and *time.Time to ensure RFC3339Nano formatting. + switch val := v.(type) { + case time.Time: + return val.UTC().Format(time.RFC3339Nano) + case *time.Time: + if val == nil { + return "" + } + return val.UTC().Format(time.RFC3339Nano) + default: + return fmt.Sprintf("%v", v) + } } From dd3cf7b590303fb5ab5da953c5d2b56c688ec47e Mon Sep 17 00:00:00 2001 From: Mrunal Patekar Date: Wed, 29 Oct 2025 14:29:04 -0700 Subject: [PATCH 2/2] update --- isp/convenience.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/isp/convenience.go b/isp/convenience.go index ad2e8be..4f08f45 100644 --- a/isp/convenience.go +++ b/isp/convenience.go @@ -246,7 +246,7 @@ func NewWithAuthHeader(header string) *HighLevelClient { // TODO: remove this... for some reason it is missing in the generated output. // At some point we need to switch to a less wonky code generator. -func parameterToString(v interface{}, s string) string { +func parameterToString(v interface{}, _ string) string { // Special-case time.Time and *time.Time to ensure RFC3339Nano formatting. switch val := v.(type) { case time.Time: