-
Notifications
You must be signed in to change notification settings - Fork 12
feat(edge-apps-library): add optional latitude and longitude parameters to getTimeZone #671
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
base: master
Are you sure you want to change the base?
Conversation
…rs to getTimeZone Allow callers to provide custom coordinates to getTimeZone() instead of always relying on metadata coordinates. This provides flexibility for testing and use cases where coordinates are known in advance. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
…s and refactor - Add tests for new optional latitude/longitude parameters - Extract repeated coordinate constants to reduce duplication - Create helper function for coordinate-to-timezone tests - Simplify test structure using coordinate constants throughout Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
User description
Summary
latitudeandlongitudeparameters togetTimeZone()functionChanges
getTimeZone()signature to accept optionallatitude?: number, longitude?: numberparametersPR Type
Enhancement
Description
Add optional coordinates to
getTimeZonePrefer explicit params over metadata coordinates
Keep override/UTC fallback behavior unchanged
Diagram Walkthrough
File Walkthrough
locale.ts
Allow getTimeZone to accept custom coordinatesedge-apps/edge-apps-library/src/utils/locale.ts
latitude?andlongitude?parameterstzlookup