Skip to content

Relative time is not correct #3699

@mirkus90

Description

@mirkus90

Screenshots

image

Labels are in Italian.
"Oggi" => "today"

All the messages, both from the user and the bot, have timestamp around 2th February 3:30 PM, whereas the screenshot was done at around 3th February 11:15 AM.

Version

Custom ReactJS webchat, created using the "botframework-webchat" 4.8.0 npm package

Describe the bug

Activities related to "yesterday" are marked as "today". For example, with current timestamp "3th February 11:15 AM", an activity with timestamp "2th February 3:30 PM" is showed as "today" in the webchat.
The reason is that in the "useRelativeTimeFormatter.js" file the logic is done with delta time within 24 hours, regardless the current day.

Steps to reproduce

  1. Go to the webchat
  2. Generate some activities
  3. Wait until the day after
  4. See the incorrect behavior

Expected behavior

When the activity is related to the day before the current day, it should be shown as "yesterday".

[Bug]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bot ServicesRequired for internal Azure reporting. Do not delete. Do not change color.ExemptFromDailyDRIReportexempt from daily DRI reportbacklogOut of scope for the current iteration but it will be evaluated in a future release.bugIndicates an unexpected problem or an unintended behavior.customer-replied-toRequired for internal reporting. Do not delete.customer-reportedRequired for internal Azure reporting. Do not delete.front-burnerneeds-schedulingneeds-team-attentionp1Painful if we don't fix, won't block releasing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions