Javascript - overriding new Date() behavior to offset GMT
<p>I'm developing a website that uses Comet to transmit data back to web clients. My application is very time sensitive, I have a graph displaying points added every second.</p>

<p>Since the web application is Comet driven there is no real need for the client to handle dates, it should only use the server timestamp to display information. i.e. a plotted point on the graph should display in the tooltip the server timestamp, regardless of the user's timezone.</p>

<p>I think my best approach would be to retrieve the server's timestamp using REST. Then measure the timezone offset between the server and client time, add/deduct the difference and use it as the client's timestamp for display purposes.</p>

<p>Is there a way to override the default behavior of <code>new Date()</code> to result in me having the server's timestamp as the local?</p>

<p>Many thanks.</p>
