Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content Log Viewer dates doesn't match server time #14

Open
fbpenalosa opened this issue Apr 30, 2024 · 4 comments
Open

Content Log Viewer dates doesn't match server time #14

fbpenalosa opened this issue Apr 30, 2024 · 4 comments

Comments

@fbpenalosa
Copy link

Hi @DanDiplo ,

Good morning. We've just started exploring this tool. The first thing we noticed is that the date column doesn't match the server time.
For testing purposes I'm just running everything locally for now

My machine time is UTC+8

I published an article at May 01, 2024 12:24 AM

image

Content Log Viewer is showing May 01, 2024 8:24 AM instead

image

Audit Trail Logs does seem to show the proper time though.

I wonder if this is a bug.

We're using:

Umbraco CMS 12.3.6
Diplo AuditLog Viewer 10.0.1

Please let me know.

Thanks.
Francis

@DanDiplo
Copy link
Owner

Hi. I format the date using AngularJS and I think this is down to the way that AngularJS uses your local timezone rather than the server timezone. This is a common thing with client-side libraries. Whether this is a bug or a feature, I'm not sure! It's not easy for me to test, as obviously when I run in development on my own PC the local and server timezone are the same.

@fbpenalosa
Copy link
Author

fbpenalosa commented May 2, 2024

Hi @DanDiplo

Thank you for the reply. I'm also just running it from my localhost for the time being so the local and server timezone are also the same. I did a bit more digging and here's what I found:

My local time is UTC+8
I saved a page today at May 02 at 6:27 PM

image

UmbracoLog table is showing it at May 02 at 5:07 PM as well

image

When I check the backoffice response, it's also returning my local time but with Z prefix:

image

I think it's treating the time from umbracoLog table as UTC and then converting it to my local time resulting to a plus 8 hour value
image

This does not happen on the Audit Log Viewer because it using umbracoAudit table instead which is using actual UTC time

image

This may lead to confusion if the log time does not match the time from the Umbraco page log. I'm not sure though where this should be adjusted.

@DanDiplo
Copy link
Owner

I have added a tooltip now (in 10.1.0) that shows the "raw" date when you hover over the date, so see if this shows the correct time for you? If it does, then I'll know if that can be used.

https://www.nuget.org/packages/Diplo.AuditLogViewer/10.1.0

@fbpenalosa
Copy link
Author

@DanDiplo Thank you for the update.

I've tested 10.1.0 on my end and the tooltip does display the current time

We'll review this and see if it's beneficial for our product.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants