Repository navigation
fix(ad-hoc): send device timezone offset under correct key and sign - #548
Merged
Merged
Conversation
Encode as app_timezone_offset (the key the API reads) and use UTC - local minutes, matching Android and browsers.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the iOS timezone metadata correction.
No open issues 🎉
What changed in this PR
Corrects iOS device timezone metadata so the API receives app_timezone_offset with the UTC-minus-local sign, matching Android and EMVCo semantics.
Changes:
- Renames the metadata property to produce the correct snake-case key and updates its consumers.
- Reverses the offset sign and adds injectable timezone support.
- Adds regression tests for offset values and JSON encoding.
| File | Description |
|---|---|
| Tests/ProcessOutTests/Sources/Unit/Core/DeviceMetadata/DefaultDeviceMetadataProviderTests.swift | Adds offset-sign and encoded-key tests. |
| Tests/ProcessOutTests/Sources/Unit/Connectors/Http/DefaultHttpConnectorRequestMapperTests.swift | Updates expected payloads for the renamed property. |
| Tests/ProcessOutTests/Sources/Mocks/DeviceMetadataProvider/StubDeviceMetadataProvider.swift | Updates the stub to use the renamed property. |
| Sources/ProcessOut/Sources/Services/Telemetry/DefaultTelemetryService.swift | Updates telemetry to read the renamed property. |
| Sources/ProcessOut/Sources/Core/DeviceMetadata/DeviceMetadata.swift | Renames the offset property and documents its sign convention. |
| Sources/ProcessOut/Sources/Core/DeviceMetadata/DefaultDeviceMetadataProvider.swift | Calculates UTC-minus-local minutes and accepts an injectable timezone. |
Review effort: Balanced
vitalii-vanziak-cko
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
iOS sent
app_time_zone_offset(ignored by the API, so Adyen got0) with the opposite sign to Android/browsers.app_timezone_offset-60for CET), matching Android and EMVCo