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

IonTextWriterBuilder write timestamp fails #52

Closed
jairveder opened this issue Jan 26, 2021 · 1 comment
Closed

IonTextWriterBuilder write timestamp fails #52

jairveder opened this issue Jan 26, 2021 · 1 comment
Assignees

Comments

@jairveder
Copy link

When using the IonTextWriterBuilder with IonTextOptions { TimestampAsMillis = false } writing of timestamps result in an System.FormatException.

Example code

{
      using (var tw = new StringWriter())
      using (var writer = IonTextWriterBuilder.Build(tw, new IonTextOptions { TimestampAsMillis = false }))
      {
          writer.Flush();
          writer.StepIn(IonType.Struct);

          writer.SetFieldName("exampleDate");
          writer.WriteTimestamp(new Timestamp(exampleDate));

          writer.StepOut();
          writer.Finish();
      
          command = tw.ToString();
      }
      
      var result = IonLoader.Default.Load(command);
}

Executing this results in the following exception:
image

Package version: 1.0.1

@simonz-bq
Copy link
Contributor

Moved to amazon-ion/ion-dotnet#132

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

3 participants