-
Notifications
You must be signed in to change notification settings - Fork 132
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
feat: Add timezone to events #1504
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is great... IMHO the solution to passing dates around and knowing what's happening
Size Change: +1.19 kB (+0.04%) Total Size: 2.95 MB
ℹ️ View Unchanged
|
@@ -194,6 +202,7 @@ export const Info = { | |||
$browser: Info.browser(userAgent, navigator.vendor), | |||
$device: Info.device(userAgent), | |||
$device_type: Info.deviceType(userAgent), | |||
$timezone: Info.timezone(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@robbie-c would be interesting to add $locale
as well
did not test but something like:
function getBrowserLocale(): string | undefined {
try {
return navigator.language || navigator.languages[0];
} catch {
return undefined;
}
}
Changes
Add timezone to events (timezone looks like Europe/London).
In older browsers that don't support Intl, this property won't be sent.
This is useful for a couple of things:
Checklist