Bug 211101 - Event timestamps are incorrect (off by almost exactly 31 years)
Summary: Event timestamps are incorrect (off by almost exactly 31 years)
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebDriver (show other bugs)
Version: Safari 13
Hardware: Unspecified Unspecified
: P2 Major
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-27 16:19 PDT by Philip Walton
Modified: 2020-04-27 16:19 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Walton 2020-04-27 16:19:29 PDT
I'm testing some code in Safari using webdriver that compares `event.timeStamp` to `performance.now()`, and I've noticed that the `event.timeStamp` values are way off.

Here is a log of a few values I'm seeing reported in an event listener:

event.timeStamp: 609714965503,
Date.now(): 1588028638216,
performance.now(): 105,

Interestingly (not sure if it's a coincidence), the value reported by event.timeStamp is a valid timestamp, and it's actually a timestamp for the same Month and Date as today, it's just 31 years off:

new Date(609714965503)
// Thu Apr 27 1989 14:16:05 GMT-0700 (Pacific Daylight Time)
new Date(1588028638216)
// Mon Apr 27 2020 16:03:58 GMT-0700 (Pacific Daylight Time)


NOTE: this behavior only occurs when Running Safari via webdriver (using https://webdriver.io/). It does not happen when using the Safari browser.