Skip to content

Link expiration date in webUI Shared by Link is one day too short #39234

@phil-davis

Description

@phil-davis

Steps to reproduce

  1. make a public link that expires today (that means the end of today)
    2.make a public link that expires tomorrow (that means the end of tomorrrow)
  2. browse to "Shared by link"

Expected behaviour

The link at point (1) should expire "in 10 hours" (not "14 hours ago")
The link at point (2) should expire in 1 day and 10 hours (whatever text the system generates for that - it might just say "1 day")

Actual behaviour

shared-by-link-expiration-date

Server configuration

Current core master.

This happens because the API returns just the expiration date with a "zero" time 00:00:00. Because of backward-compatibility issues we could not fix that at the API level. So clients (like the webUI here) need to understand that the link is valid right up to and including 23:59:59 on the expiry day.

Please also have a look around the webUI code to see where else the expiration date is rendered in a way includes the time in the calculation. Any such places are likely to have a similar off-by-one-day error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions