Skip to content
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

send correct timestamp with turnstile event #7381

Merged
merged 2 commits into from
Oct 9, 2018
Merged

Conversation

mollymerp
Copy link
Contributor

@mollymerp mollymerp commented Oct 8, 2018

I noticed while implementing #7297 that our turnstile event is setting the created payload property to a value from browser.now() which on most browsers is an alias for performance.now() which is not the current day/time, but milliseconds since the JS started executing or something along those lines, so our values were always in the 1970s which I don't think is the intended behavior.

Launch Checklist

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • document any changes to public APIs
  • post benchmark scores
  • manually test the debug page

Copy link
Contributor

@asheemmamoowala asheemmamoowala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I don't see any other incorrect uses of browser.now either.

@mollymerp mollymerp force-pushed the timestamp-fix branch 2 times, most recently from 98d1caa to db0e77e Compare October 9, 2018 22:10
@mollymerp mollymerp merged commit 5ad058b into master Oct 9, 2018
@mollymerp mollymerp deleted the timestamp-fix branch October 9, 2018 23:52
kkaefer pushed a commit that referenced this pull request Oct 10, 2018
* send correct timestamp with turnstile event

* update TurnstileEvent tests
kkaefer pushed a commit that referenced this pull request Oct 10, 2018
* send correct timestamp with turnstile event

* update TurnstileEvent tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants