Skip to content

Change Members::ActivityService to use user timezone

Vijay Hawoldar requested to merge vij-use-dormant-members-tz into master

What does this MR do and why?

This MR changes the Members::ActivityService to use the user's timezone when creating a lease in Redis.

Previously, we would create a lease until midnight UTC to prevent multiple updates for the same user in a single day.

This had a side effect that meant at midnight UTC, we would see a large increase in the number of activities being recorded again.

This change mitigates that slightly in that it will attempt to use the user's timezone, creating a lease until midnight in their time zone instead.

If a user does not have a timezone set, user.timezone will be nil and it will fall back to UTC as it was before.

Refs #479114 (closed)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Merge request reports

Loading