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

'DateDiff' Lava Filter returns different results based on if the 'Date' Lava Filter has Formatting Elements or not #5070

Closed
IzabellaDTS opened this issue Jul 8, 2022 · 0 comments
Labels
Priority: High Affects most production Rock installs in a way that will be noticed. Topic: Lava Related to the Lava templating language. Type: Bug Confirmed bugs or reports that are very likely to be bugs. x-Fixed in v13.7

Comments

@IzabellaDTS
Copy link

IzabellaDTS commented Jul 8, 2022

A Picture Is worth a Thousand Words

image

image

Description

When using the 'DateDiff' lava filter, if one of the DateTimes used in the DateDiff filter is generated using the 'Date' lava filter WITHOUT any formatting elements, the DateDiff will return a value that is an hour greater than what the actual result should be.

You can see this error play out in the images above. The first picture is of the lava code and the second picture is the result. As you can see, there is a difference of 3600 seconds when using the Date Filter Without Formatting Elements and the Date Filter With Formatting Elements.

Steps to Reproduce

  1. You will need to use either the Lava Tester plugin or an HTML block.

  2. Generate lava code similar to what is seen above

  3. Click 'Save' or 'Test' (depending on whether you are using the Lava Tester or the HTML block)

  4. View Results

Expected behavior:

The 'DateDiff' lava filter should return the same result whether or not the 'Date' lava filter has formatting elements.

Actual behavior:

The 'DateDiff' lava filter returns different results based on if the 'Date' lava filter has formatting elements or not.

Versions

  • Rock Version: Rock McKinley 13.3 (1.13.3.1)
  • Client Culture Setting: en-US
@sparkdevnetwork-service sparkdevnetwork-service added Not Yet Reproduced Priority: High Affects most production Rock installs in a way that will be noticed. Topic: Lava Related to the Lava templating language. Type: Bug Confirmed bugs or reports that are very likely to be bugs. labels Jul 20, 2022
MrUpsideDown added a commit that referenced this issue Jul 26, 2022
…ylight saving dates when processing some input formats. (Fixes #5070)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High Affects most production Rock installs in a way that will be noticed. Topic: Lava Related to the Lava templating language. Type: Bug Confirmed bugs or reports that are very likely to be bugs. x-Fixed in v13.7
Projects
None yet
Development

No branches or pull requests

3 participants