Skip to content

fix(auth): include user timezone in login request#26

Closed
Suyash-ka-github wants to merge 0 commit intobrowseping:mainfrom
Suyash-ka-github:fix/login-send-timezone
Closed

fix(auth): include user timezone in login request#26
Suyash-ka-github wants to merge 0 commit intobrowseping:mainfrom
Suyash-ka-github:fix/login-send-timezone

Conversation

@Suyash-ka-github
Copy link

@Suyash-ka-github Suyash-ka-github commented Jan 25, 2026

Description

This pull request fixes missing timezone information during user login by sending the browser-detected timezone to the backend.

This ensures backend services (such as analytics) can correctly process user activity based on the user's local timezone instead of UTC.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test addition/update
  • Chore/maintenance

Changes Made

  • Added browser timezone detection using Intl.DateTimeFormat().resolvedOptions().timeZone
  • Included timezone in login API request payload
  • Updated login request typing to support timezone field

Testing Done

  • Logged in locally using the browser extension
  • Verified timezone value is correctly sent to the backend
  • Confirmed backend receives and stores timezone without errors

Checklist

  • I have read and followed all guidelines in CONTRIBUTING.md
  • I have used the correct branch naming convention (feature/, fix/, docs/, etc.)
  • My commits follow Conventional Commits format (feat:, fix:, docs:, etc.)
  • I have performed a self-review and tested my changes thoroughly
  • CRITICAL: I confirm ONLY my intended changes are included (no unrelated changes, debug code, or breaking changes)
  • I have updated relevant documentation if needed

Screenshots (if applicable)

N/A (no UI changes)

Additional Notes

This change complements backend timezone handling and enables correct timezone-aware analytics for users across different regions.

Related PRs

Related to: browseping/server#20 - This PR provides the timezone data that the server-side changes consume for timezone-aware analytics. Both PRs should be merged together for complete functionality.

@Suyash-ka-github
Copy link
Author

This is the fix for the Timezone Issue I raised on the server Could you please let me know if everthing is fine and good to go

@akash-kumar-dev
Copy link
Member

Related to: browseping/server#20

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

Successfully merging this pull request may close these issues.

2 participants

Comments