Gumgum Bid Adapter: add local time and timezone offset in requests#7587
Merged
ChrisHuie merged 2 commits intoprebid:masterfrom Oct 20, 2021
Merged
Conversation
lbenmore
commented
Oct 14, 2021
| const bidRequest = spec.buildRequests(bidRequests)[0]; | ||
| const actualKeys = Object.keys(JSON.parse(bidRequest.data.jcsi)).sort(); | ||
| expect(actualKeys).to.eq(actualKeys); | ||
| expect(actualKeys).to.eql(expectedKeys); |
Contributor
Author
There was a problem hiding this comment.
i only modified this because i don't think it was testing the way it was intended
|
This pull request introduces 2 alerts when merging 2452e15 into ff18876 - view on LGTM.com new alerts:
|
patmmccann
reviewed
Oct 15, 2021
|
|
||
| const date = new Date(); | ||
| const lt = date && date.getTime(); | ||
| const to = date && date.getTimezoneOffset(); |
Collaborator
There was a problem hiding this comment.
why waste your time with offset when you can get something more detailed like this console.log(Intl.DateTimeFormat().resolvedOptions().timeZone)
Contributor
Author
There was a problem hiding this comment.
our ad server is currently expecting the timezone offset in minutes. this keeps it consistent with all of our other requests. also, as it uses a pretty basic and straightforward method, i wouldn't consider it a waste of time.
ChrisHuie
approved these changes
Oct 20, 2021
cpabst
pushed a commit
to sovrn/Prebid.js
that referenced
this pull request
Jan 10, 2022
…rebid#7587) * Gumgum: ADTS-164 Send local time and timezone offset in ad requests * object existence check before accessing property
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.
added unit test; updated an unrelated unit test that appears to not h…ave been testing the way it shouldve been
Type of change
Description of change
Adds the user's local time and their timezone offset (in minutes) to the requests sent to our ad server