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

Issue with DateTime format including TimeZone information when applying subsequent transformations #529

Closed
Seddryck opened this issue Oct 2, 2019 · 1 comment

Comments

@Seddryck
Copy link
Owner

Seddryck commented Oct 2, 2019

When you've this kind of format including the Z to specify the UTC, it starts to be a mess because the dateTime is automatically transformed into the UTC value ... even if it was already a UTC.

<result-set>
  <row>
    <cell>2019-10-01T12:15Z</cell>
  </row>
  <alteration>
    <transform column="#0" original-type="text" language="native">
      text-to-dateTime(yyyy-MM-ddTHH:mmZ) | utc-to-local(Brussels)
    </transform>
  </alteration>
</result-set>

Moreover, when you use additional transformation such as utc-to-local(Brussels), it throws an exception:

at System.TimeZoneInfo.ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone, TimeZoneInfoOptions flags, CachedData cachedData)
at System.TimeZoneInfo.ConvertTimeFromUtc(DateTime dateTime, TimeZoneInfo destinationTimeZone)
at NBi.Core.Transformation.Transformer.Native.UtcToLocal.EvaluateDateTime(DateTime value) in C:\projects\nbi\NBi.Core\Transformation\Transformer\Native\DateTime\TimeZoneTransformations.cs:line 19
at NBi.Core.Transformation.Transformer.Native.AbstractDateTimeTransformation.Evaluate(Object value) in C:\projects\nbi\NBi.Core\Transformation\Transformer\Native\DateTime\DateTimeTransformations.cs:line 20
at NBi.Core.Transformation.Transformer.NativeTransformer`1.Execute(Object value) in C:\projects\nbi\NBi.Core\Transformation\Transformer\NativeTransformer.cs:line 53
at NBi.Core.Transformation.TransformationProvider.Transform(ResultSet resultSet) in C:\projects\nbi\NBi.Core\Transformation\TransformationProvider.cs:line 47
at NBi.Core.ResultSet.ResultSetService.Execute() in C:\projects\nbi\NBi.Core\ResultSet\ResultSetService.cs:line 28
at NBi.NUnit.ResultSetComparison.LookupReverseExistsConstraint.<>c__DisplayClass2_0.<ProcessParallel>b__0() in C:\projects\nbi\NBi.NUnit\ResultSetComparison\LookupReverseExistsConstraint.cs:line 32
at System.Threading.Tasks.Task.Execute()
@Seddryck Seddryck added the bug label Oct 2, 2019
@Seddryck Seddryck added this to the v1.21 milestone Oct 2, 2019
Seddryck pushed a commit that referenced this issue Oct 2, 2019
@Seddryck
Copy link
Owner Author

Seddryck commented Oct 3, 2019

Beta available at https://ci.appveyor.com/project/Seddryck/nbi/builds/27849532/artifacts or with 1.21.0-beta.193.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant