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:
func Demo(t time.Time) { fmt.Println(t.Location()) tt := carbon.CreateFromStdTime(t). SetLocation(t.Location()). StartOfHour(). StdTime() fmt.Println(tt) fmt.Println(time.Date(t.Year(), t.Month(), t.Day(), t.Hour(), 0, 0, 0, t.Location())) } func Test_demo2(t *testing.T) { loc, _ := time.LoadLocation("Asia/Shanghai") Demo(time.Date(2024, 3, 15, 14, 30, 45, 123456789, loc)) }
golang version: go version go1.23.4 darwin/amd64
carbon version: v2.6.1
time zone: Asia/Shanghai
I expected to get:
Asia/Shanghai 2024-03-15 14:00:00 +0800 CST 2024-03-15 14:00:00 +0800 CST
But I actually get:
Asia/Shanghai 2024-03-15 14:00:00 +0000 UTC -- error, timezone not right 2024-03-15 14:00:00 +0800 CST
Thanks!
The text was updated successfully, but these errors were encountered:
use v2.6.2-rc2
v2.6.2-rc2
go get -u gitee.com/dromara/carbon/v2@v2.6.2-rc2
Sorry, something went wrong.
No branches or pull requests
Hello,
I encountered an issue with the following code:
golang version: go version go1.23.4 darwin/amd64
carbon version: v2.6.1
time zone: Asia/Shanghai
I expected to get:
But I actually get:
Thanks!
The text was updated successfully, but these errors were encountered: