Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-16823

Datetime class incorrectly handles edge yesterday/today/tomorrow cases

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.3.4
    • Fix Version/s: 3.3.5-RC1
    • Component/s: Other
    • Labels:
      None

      Description

      For relative time formats, /phpbb/datetime class will render (best to reproduce with 'UTC' timezone):
      YYYY-MM-DD 00:00 - for $midnight - 86400 (should be Yesterday 00:00)
      Yesterday 00:00 - for $midnight (should be Today 00:00)
      Today 00:00 - for $midnight + 86400 (should be Tomorrow 00:00).

      Additionally, it will render 'less than a minute ago' for timestamps from the future:
      timestamps up to 5 seconds ahead, or
      timestamps up to 59 seconds ahead if the same minute with the current time.
      This seems to be intentional but currently the intention is not clear.

        Attachments

          Activity

            People

            Assignee:
            CHItA CHItA
            Reporter:
            rxu rxu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: