umbraco / Umbraco-CMS

Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
https://umbraco.com
MIT License
4.4k stars 2.66k forks source link

Log Viewer date selector doesn't work correctly due to browser / server date difference. #14710

Open readingdancer opened 1 year ago

readingdancer commented 1 year ago

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

10.5.0

Bug summary

When looking at the Umbraco Log Viewer in the back office settings section late in the evening, the most recent log messages are not visible.

Specifics

No response

Steps to reproduce

When looking at the Log Viewer in the evening ( I am currently in the US Mountain time zone ) I noticed that I was not seeing the latest log messages. The date range was the default (which I believe shows the yesterday & today).

It was not possible to select tomorrow (which would normally make sense) but I tried changing the endDate in the URL e.g.

endDate=2023-08-22 (where the date was the next day)

Hey presto, my missing log messages showed. Even though the date's shown were from today's date (local time).

My guess is that the datatime on the server was already in the next day, but the filtering was based on my local browser time and the display of the dates also seem to be translated into my local time.

Expected result / actual result

What I would expect is that if I ask for data including "today" it would show everything up until midnight today in my local time and not based on the server time.

github-actions[bot] commented 1 year ago

Hi there @readingdancer!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot :robot: :slightly_smiling_face:

Zeegaan commented 1 year ago

Hmm wierd one, I guess in general, there should just not be an end-date when viewing all logs anyways, as that doesn't really make sense 🤷

What timezone are you in, in general? And what time did you do this at, I want to try and reproduce this, but its hard without knowing the times 😁

readingdancer commented 1 year ago

I am currently in Utah (MDT), normally I am in North Carolina (EST)

I think I am right in saying all Azure data centers have their server dates set to UTC even those in the US data centers, so date conversion should always take place and I think this might be the issue.

I agree if by default it showed from yesterday with no end date, that would solve the initial problem. However if someone sets a date range ending today, it would currently still fail to show the latest items in the log.

I will try again later today and upload some screenshots.

Zeegaan commented 1 year ago

I agree if by default it showed from yesterday with no end date, that would solve the initial problem. However if someone sets a date range ending today, it would currently still fail to show the latest items in the log.

Ah yes, didn't think about that, good point 👍

Yes please do, thanks 🙌