-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Feature Description
Currently, hourly analytics are calculated using server time (UTC), which causes users in different timezones to see activity mapped to incorrect hours (e.g., activity at 10 AM local time appearing as 4–5 AM).
This feature would allow analytics (hourly trends, peak hours, daily ranges) to be displayed according to the user’s local timezone.
Use Case / Problem Statement
BrowsePing is a globally usable browser extension, and users may be located in different timezones.
At the moment, hourly analytics such as Hourly Online Trend and Peak Hour are derived from server time rather than user-local time.
This leads to:
Confusing analytics (activity appears at unexpected hours)
Misleading “peak hour” information
Poor user experience for users outside UTC
For example:
A user browsing at 10:00 AM IST sees analytics showing activity at 4:00–5:00
This makes it appear as though usage happened at a completely different time
Timezone-aware analytics would ensure users see data that reflects their actual browsing behavior.
Proposed Solution
Capture the user’s timezone on the client side using:
Intl.DateTimeFormat().resolvedOptions().timeZone
Store the timezone as part of the user profile (e.g., Asia/Kolkata, America/New_York).
Continue storing all timestamps in UTC (no change to current storage approach).
During analytics calculation:
Convert UTC timestamps to the user’s timezone
Bucket activity by local hour (0–23) instead of server hour
Use timezone-aware date boundaries for daily/hourly aggregation
This ensures:
Hourly graphs match the user’s local clock
Peak hours are meaningful
Analytics remain consistent across regions
Alternative Solutions
Alternative Solutions
Display analytics strictly in UTC and label them as such (less user-friendly)
Additional Context
Additional Context
This is especially noticeable for users in non-UTC regions (e.g., Asia, Australia).
The issue becomes more prominent with features like Peak Hour and Hourly Trends.
Checklist
- I have checked existing issues for similar requests
- This feature would be useful for multiple users
- I have provided use cases and examples