简阳版本

This commit is contained in:
hoteas
2022-02-19 21:38:17 +08:00
parent 6a46d06e81
commit 3e94cf8def
4 changed files with 48 additions and 51 deletions
+2
View File
@@ -10,11 +10,13 @@ import (
"io/ioutil"
"net/http"
gourl "net/url"
"strings"
"time"
)
func calcAuthorization(source string, secretId string, secretKey string) (auth string, datetime string, err error) {
timeLocation, _ := time.LoadLocation("Etc/GMT")
datetime = time.Now().In(timeLocation).Format("Mon, 02 Jan 2006 15:04:05 GMT")
signStr := fmt.Sprintf("x-date: %s\nx-source: %s", datetime, source)