Skip to content
New issue

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

Loss of precision when time is hour on the hour #171

Closed
devhaozi opened this issue May 26, 2023 · 1 comment
Closed

Loss of precision when time is hour on the hour #171

devhaozi opened this issue May 26, 2023 · 1 comment
Labels
Bug Report a reproducible bug or regression

Comments

@devhaozi
Copy link

Hello,

I encountered an issue with the following code:

carbon.SetTimezone(carbon.UTC).Now().StartOfDay().ToRfc3339MilliString()

golang version: 1.20

carbon version: 2.2.3

time zone: UTC

I expected to get:

2023-05-26T00:00:00.000Z

But I actually get:

2023-05-26T00:00:00Z

Thanks!

@devhaozi devhaozi added the Bug Report a reproducible bug or regression label May 26, 2023
@devhaozi devhaozi changed the title Loss of precision when time is Loss of precision when time is hour on the hour May 26, 2023
@gouguoyin
Copy link
Collaborator

When milliseconds are 0, the number after the decimal point is not displayed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report a reproducible bug or regression
Projects
None yet
Development

No branches or pull requests

2 participants