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:
carbon.Now("Europe/Kiev").StartOfMonth().TimestampMilli()
golang version: go version go1.21.3 darwin/arm64
carbon version: v2.2.0
time zone: -
I expected to get:
1696111200000
But I actually get: 1 hour less
1696107600000
But this solution works just fine:
timezone := "Europe/Kiev" loc, _ := time.LoadLocation(timezone) _, tzOffset := time.Now().In(loc).Zone() carbon.Now().SetTimezone("UTC").StartOfMonth().TimestampMilli() + int64(tzOffset)*-1000
Thanks!
The text was updated successfully, but these errors were encountered:
carbon.Now("Europe/Kiev") = ?
What is the current time here?
Sorry, something went wrong.
https://go.dev/play/p/k8moI-KdDkk
carbon.Now("Europe/Kiev") = ? What is the current time here?
Fastest way to check: https://www.google.com/search?q=time+kiev
Idk why its wrong. But it is wrong by 1 hour. Any idea why?
No branches or pull requests
Hello,
I encountered an issue with the following code:
golang version: go version go1.21.3 darwin/arm64
carbon version: v2.2.0
time zone: -
I expected to get:
But I actually get: 1 hour less
But this solution works just fine:
Thanks!
The text was updated successfully, but these errors were encountered: