Issue 14: JS library uses client local time
Status:  Fixed
Owner:
Closed:  Mar 2010
Reported by lith...@gmail.com, Mar 18, 2010
This is a pretty fundamental flaw, which may or may not be recoverable,
but: this library uses the client's clock to calculate offset from a
start/end time.

However - it's not good practice to trust the client's clock!

Example: my server can send a start time for a count-up clock of 22:00 GMT.
If the client's clock is set differently to mine - say it's a half hour
behind, for whatever reason - you're going to get wrong results shown to
the user.

Realistically we should be sending a number of seconds since/to the event -
as calculated by the server - and either incrementing or decrementing this
value on the client side for display.

Mar 18, 2010
Project Member #1 gars...@gmail.com
I've added a new clock mode to handle your request of displaying the server time. I haven't added 
documentation on it yet, but you can use this new clock as follows:

// Once the dom loads...     
     jQuery(function(){             
        jQuery('#clock') 
            .epiclock({mode: EC_EXPLICIT, target: 'March 18, 2010 11:59:54 PM EDT'})      // We define the clock...   
            .clocks(EC_RUN); // Then start the manager. 
     });

The target parameter should be a valid input representing the time from the server. This will render a clock 
which treats the target value as the actual starting value, renders it as a clock, and keeps time by counting the 
second offset from when the clock starts.

Let me know if you have any further issues. Released and available in the downloads section as release 3.2.3
Status: Fixed
Owner: garside
Labels: -Type-Defect Type-Enhancement
Mar 18, 2010
Project Member #2 gars...@gmail.com
This should handle the default clock type counter. However, if you want to mimic the explicit clock 
functionality for one of the other clocks, you should be able to replicate it by calling:

jQuery('#clock').epiclock({mode: ..., displace: - new Date().valueOf()});

This isn't tested, though, and may not work as expected. I've had a bit of beer tonight, and am only 
speculating as to the functionality for non-EC_EXPLICIT modes.