1 回答

TA貢獻(xiàn)1946條經(jīng)驗(yàn) 獲得超4個(gè)贊
您是如何生成此查詢的:
Update BucketName as e
set start_time="2021-04-27 22:24:31 +0000 UTC",
end_time="2021-11-01 22:24:31 +0000 UTC" where ( my document equality condition)
returning e
正如錯(cuò)誤所說,存儲(chǔ)在couchbase中的時(shí)間數(shù)據(jù)應(yīng)該采用RFC3339()格式,而不是默認(rèn)格式,所以也許你應(yīng)該用quer插入數(shù)據(jù):2006-01-02T15:04:05Z07:002006-01-02 15:04:05 -0700 MST
Update BucketName as e
set start_time="2021-04-27T22:24:31Z07:00",
end_time="2021-11-01T22:24:31Z07:00" where ( my document equality condition)
returning e
如果您在格式化時(shí)間時(shí)遇到問題,請(qǐng)閱讀文檔 https://golang.cafe/blog/golang-time-format-example.html
而且,正如@MrFuppes注釋的那樣,如果您需要自定義JSON輸出格式,請(qǐng)閱讀此如何在傳出JSON中格式化時(shí)間戳
- 1 回答
- 0 關(guān)注
- 172 瀏覽
添加回答
舉報(bào)