Closed Bug 579652 Opened 14 years ago Closed 14 years ago

Events have incorrect time stamps

Categories

(Core :: DOM: Events, defect)

x86
Windows XP
defect
Not set
minor

Tracking

()

RESOLVED DUPLICATE of bug 77992

People

(Reporter: jim, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 (.NET CLR 3.5.30729) FirePHP/0.4 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 (.NET CLR 3.5.30729) FirePHP/0.4 According to both the DOM specification and the Firefox page https://developer.mozilla.org/en/DOM/event.timeStamp, an event time stamp gives the ellapsed time in milliseconds since the dawn of the current epoch (1/1/1970). However, on my computer, the elapsed time is only since the last reboot of my computer. Reproducible: Always Steps to Reproduce: 1. Load the attached file. 2. Check that its source code does what it does 3. Follow the simple instructions given in the file 4. See if you see what I'm seeing! Actual Results: Date.now(): 1279380866994 event.timeStamp: 3094687 Difference: 1279377772307 Difference as a UTC string: Sat, 17 Jul 2010 14:42:52 GMT Expected Results: Date.now(): 1279380866994 event.timeStamp:1279380866981 Difference: 11 [approximately] Difference as a UTC string: 1 Jan 1970 00:00:00 GMT The workaround is to add a separate user-supplied timestamp to the event object.
Assignee: nobody → general
Component: General → JavaScript Engine
Product: Firefox → Core
QA Contact: general → general
This bug is a potential security concern in two cases: 1. If I'm a hacker who just installed a patch on your computer, and it won't take effect until you reboot, I can write a script that lays low until it has a chance to finally thank you for rebooting. 2. Slow memory leaks and similar security flaws become more exploitable the longer a computer is running. So knowing how long the machine has been up sheds light on when to attack.
Assignee: general → nobody
Component: JavaScript Engine → DOM: Events
QA Contact: general → events
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: