Activity time wrong calculated? #1144

Closed
opened 2026-02-04 23:59:27 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @JtheBAB on GitHub (Apr 17, 2019).

Describe the bug
The time in the revision or activity tab is not correctly calculated.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Login into bookstack
  2. Check the "Recent Activity"
  3. See that for example 1 day ago is actually 2 days ago

Expected behavior
The time should be correctly calculated

Screenshots
image

For me it should be 2 days ago.

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): v0.25.5
  • PHP Version: 7.3
  • Hosting Method (Nginx/Apache/Docker): Apache

Additional context
Add any other context about the problem here.

Originally created by @JtheBAB on GitHub (Apr 17, 2019). **Describe the bug** The time in the revision or activity tab is not correctly calculated. **Steps To Reproduce** Steps to reproduce the behavior: 1. Login into bookstack 2. Check the "Recent Activity" 3. See that for example 1 day ago is actually 2 days ago **Expected behavior** The time should be correctly calculated **Screenshots** ![image](https://user-images.githubusercontent.com/42135332/56286575-5b480000-611a-11e9-8c1c-df68b3d50ad5.png) For me it should be 2 days ago. **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): v0.25.5 - PHP Version: 7.3 - Hosting Method (Nginx/Apache/Docker): Apache **Additional context** Add any other context about the problem here.
Author
Owner

@ssddanbrown commented on GitHub (Apr 17, 2019):

Hi @JtheBAB,
Relative times will generally be rounded to some level. Depending on your timezone, it may have not yet been two days (In terms of 24 hours periods) since the revision date. If you check if a few hours after 2PM in your timezone I'd expect it to say 2 days ago, Let me know if it does not.

@ssddanbrown commented on GitHub (Apr 17, 2019): Hi @JtheBAB, Relative times will generally be rounded to some level. Depending on your timezone, it may have not yet been two days (In terms of 24 hours periods) since the revision date. If you check if a few hours after 2PM in your timezone I'd expect it to say 2 days ago, Let me know if it does not.
Author
Owner

@JtheBAB commented on GitHub (Apr 17, 2019):

You’re right. Now it say‘s 2 days ago. Somehow just strange that it is not that accurate as it is (maybe) expected.

@JtheBAB commented on GitHub (Apr 17, 2019): You’re right. Now it say‘s 2 days ago. Somehow just strange that it is not that accurate as it is (maybe) expected.
Author
Owner

@ssddanbrown commented on GitHub (Apr 17, 2019):

@JtheBAB Pretty sure it's pretty much doing ROUND_DOWN(hours_since_date/24). Makes sense but can look odd when you're close to entering the next day, Like above.

@ssddanbrown commented on GitHub (Apr 17, 2019): @JtheBAB Pretty sure it's pretty much doing ROUND_DOWN(hours_since_date/24). Makes sense but can look odd when you're close to entering the next day, Like above.
Author
Owner

@JtheBAB commented on GitHub (Apr 17, 2019):

Ok. Thanks

@JtheBAB commented on GitHub (Apr 17, 2019): Ok. Thanks
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1144