Open Closed

Entity changes showing incorrect time ago text when selecting different languages (cultures) #776


User avatar
0
michael.sudnik created
  • ABP Framework version: v4.0.1
  • UI type:MVC
  • DB provider: MongoDB
  • Tiered (MVC) or Identity Server Seperated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:

If I choose a display language that has a different date format (e.g. en-gb), then the time-ago is calculated incorrectly within the entity change history widget view component.

The {entityChange.ChangeTime} needs to be replaced by {entityChange.ChangeTime:o} to ensure that it is rendered in the ISO 8601 format, regardless of which culture is being used.

Mike


2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi @michael.sudnik

    I will check it, Thanks.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    It will fixed in next version.

    audit-logging/src/Volo.Abp.AuditLogging.Web/Pages/Shared/Components/EntityChangeWidget/Default.cshtml

    var daysAgo = $"<time class=\"timeago\" data-toggle=\"popover\" data-placement=\"top\" data-trigger=\"hover\" datetime=\+++==={entityChange.ChangeTime:O}\" data-content=\"{entityChange.ChangeTime}\"></time>";
    
Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11