django-easy-audit
django-easy-audit copied to clipboard
How to get Client timeZone date and time in Logs
The Current audit logging (loginevent) has datetime as server, but need user timezone
will require to add pytz and utilize from django.utils import timezone , but not sure how to change it
requesting assistance @soynatan [Natán]
lets say there are 2 users, [user1 is in timezone GMT+1 and user2 is in timezone GMT+4] and server in GMT+3 but in record added on login, both user will be logged in at server time, and unable to show them user timezone date and time
it would be helpful to able like in django:user lastlogin field
If possible, I would recommend trying to resolve this from the application code.
https://docs.djangoproject.com/en/4.1/topics/i18n/timezones/#time-zone-aware-output-in-templates (and generally speaking the related sections in that same page with respect to the other configurable machinery of datetime in django).
If there is a way to accomplish this without being a large burden on your code-base, but you are unsure of how you might, would you be able to share some snippets of code or anonymized/example snippets of code to help aid us in finding a solution?
If all fails, we will consider adding the support into the library.