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

Timestamp doesn't respect precision when output in text mode #151

Closed
CoderNate opened this issue Jul 27, 2023 · 0 comments
Closed

Timestamp doesn't respect precision when output in text mode #151

CoderNate opened this issue Jul 27, 2023 · 0 comments

Comments

@CoderNate
Copy link
Contributor

If I construct a Timestamp with Precision set to Amazon.IonDotnet.Timestamp.Precision.Day and write it with a text writer it outputs something like 2023-01-01T00:00:00.0000000-00:00. The text writer just calls ToString which doesn't look at Precision at all:

? this.DateTimeValue.ToString("O") + "-00:00"

It looks like the Java implementation does respect Precision in toString:
https://github.com/amazon-ion/ion-java/blob/a87fb20820f44b8bc6575926710b86a48f3149ce/src/com/amazon/ion/Timestamp.java#L2144

CoderNate pushed a commit to CoderNate/ion-dotnet that referenced this issue Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant