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

[BUG] case timeline date badge off by 1 #722

Open
jasonwuwrf opened this issue Feb 14, 2025 · 1 comment
Open

[BUG] case timeline date badge off by 1 #722

jasonwuwrf opened this issue Feb 14, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@jasonwuwrf
Copy link

Describe the bug
The badge that is on the left side, in column 1, seems to render in the date prior to the first event of the date. The case timeline is in UTC. The date and time for events are showing in UTC. The outcome does not seem to be impacted by the offset provided, since the bug seems to be related to date the after conversion to UTC has occured.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a case timeline
  2. Add events to the timeline, using any UTC offset, including -00:00.
  3. Show the timeline
  4. See error where the date badges are off by one

Expected behavior
The date badge should be equal to the displayed date(time) in the first event in the list. It is confusing to see the "day before" the first event showing and can lead to misinterpretation of the events at a macro level.

Screenshots
Image

@jasonwuwrf jasonwuwrf added the bug Something isn't working label Feb 14, 2025
@slw07g
Copy link
Contributor

slw07g commented Feb 19, 2025

This is because a known inconsistency with the js Date() constructor.
Currently, a date string is passed to the constructor ("yyyy-mm-dd"); one way to work around the issue is to pass the year, month, and day separately. When doing this month needs to be set to m-1, because Date expects months to be numbered starting with 0 instead of 1.

whikernel added a commit that referenced this issue Feb 24, 2025
[#722][IMP]Fix date parsing bug in case timeline (time badge)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants