We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I encountered an issue with the following code:
package main import ( "github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/net/ghttp" "github.com/golang-module/carbon/v2" ) type DemoReq struct { Now *carbon.DateTime `json:"now" v:"required|datetime"` } type DemoRes struct { Code int `json:"code"` Error string `json:"error"` Data any `json:"data"` } func main() { s := g.Server() s.BindHandler("/demo", func(r *ghttp.Request) { var req *DemoReq if err := r.Parse(&req); err != nil { r.Response.WriteJsonExit(DemoRes{ Code: 1, Error: err.Error(), }) } // ... r.Response.WriteJsonExit(DemoRes{ Data: req, }) }) s.SetPort(8899) s.Run() }
POST 访问: http://127.0.0.1:8899/demo 参数:
{ "now": "2023-11-03 00:00:00" }
使用 v2.2.12 以下版本没有问题,v2.2.12 报错
v2.2.12
exception recovered: time: missing Location in call to Time.In
应该是 https://github.com/golang-module/carbon/blob/d16c40b9c9221f526342ee049dd74b9dd3d0906c/comparer.go#L10 这里的问题
golang version:
# -> % go version go version go1.21.3 darwin/amd64
carbon version:
time zone: such as Japan
I expected to get:
2020-08-08 13:14:15
But I actually get:
2020-08-07 13:14:15
Thanks!
The text was updated successfully, but these errors were encountered:
Can confirm this issue. version v2.2.11 seems to work ok.
Sorry, something went wrong.
Released and fixed in v2.2.13
v2.2.13
No branches or pull requests
Hello,
I encountered an issue with the following code:
POST 访问: http://127.0.0.1:8899/demo
参数:
使用
v2.2.12
以下版本没有问题,v2.2.12
报错应该是 https://github.com/golang-module/carbon/blob/d16c40b9c9221f526342ee049dd74b9dd3d0906c/comparer.go#L10 这里的问题
golang version:
# -> % go version go version go1.21.3 darwin/amd64
carbon version:
time zone: such as Japan
I expected to get:
But I actually get:
Thanks!
The text was updated successfully, but these errors were encountered: