From de5c682dd534b9aa1d04745a40871ce247e066b9 Mon Sep 17 00:00:00 2001 From: Spotlight Date: Tue, 18 Aug 2020 22:35:13 -0500 Subject: [PATCH] Use more precise timestamp --- utils.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils.go b/utils.go index fb6e217..60f9b9b 100644 --- a/utils.go +++ b/utils.go @@ -20,10 +20,10 @@ package main import ( "encoding/xml" "errors" + "fmt" "github.com/antchfx/xmlquery" "io" "regexp" - "strconv" "time" ) @@ -47,7 +47,7 @@ func parseAction(original string) (string, string) { // NewEnvelope returns a new Envelope with proper attributes initialized. func NewEnvelope(service string, action string) Envelope { // Get a sexy new timestamp to use. - timestampNano := strconv.FormatInt(time.Now().UTC().Unix(), 10) + "000" + timestampNano := fmt.Sprint(time.Now().UTC().UnixNano())[0:13] return Envelope{ SOAPEnv: "http://schemas.xmlsoap.org/soap/envelope/",