advplyr / audiobookshelf

Self-hosted audiobook and podcast server
https://audiobookshelf.org
GNU General Public License v3.0
5.52k stars 380 forks source link

[Bug]: User Stats Not showing current listening progress #2962

Open kanjieater opened 3 weeks ago

kanjieater commented 3 weeks ago

What happened?

I listened to over an hour of audiobooks today but it didn't show all of my time tracked
image

What did you expect to happen?

User stats should show the users stats up to date with how much they've listened to that day. I'd like to know how much I listened to today.

Steps to reproduce the issue

  1. Listen to multiple sessions
  2. User stats seems to stop tracking it

Audiobookshelf version

v2.9.0

How are you running audiobookshelf?

Docker

What OS is your Audiobookshelf server hosted from?

Linux

If the issue is being seen in the UI, what browsers are you seeing the problem on?

Chrome

Logs

No response

Additional Notes

No response

kanjieater commented 3 weeks ago

Server time was set to UTC but i was expecting clients to be local time. Would it be better to allow users to set their own timezone or detect it per device?

advplyr commented 3 weeks ago

Timestamps are stored in UTC and when needed they are converted using whatever timezone the server is set. You should define the timezone you want in your docker config. Is this still a bug?

kanjieater commented 3 weeks ago

Timestamps are stored in UTC and when needed they are converted using whatever timezone the server is set. You should define the timezone you want in your docker config. Is this still a bug?

I would think the server would set it's time (probably utc), but imagine I have two users, one in japan & one in america. What would the user stats show for that day? I thought this was a timezones issue but maybe I'm wrong

You can see that as someone in America/Chicago time zone accessing my UTC server it only shows 40~mins for the day image

it didn't show that I had listened to at least this full 1hr 11min session (and the other session before it too on the same day) image

kanjieater commented 3 weeks ago

I modified my timestamps like so, and still am seeing this strange behavior image

It says I've listened to 3 hours this morning already, when I only listened to about 10, but listened to about 3 hours yesterday image