feat(edge-apps-library): add optional latitude and longitude parameters to getTimeZone#671
feat(edge-apps-library): add optional latitude and longitude parameters to getTimeZone#671nicomiguelino wants to merge 3 commits intomasterfrom
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