/**
 * Models the current time on the server. Requires Prototype.js
 *
 * Author: Erik Hanson http://www.eahanson.com/
 */
var ServerTime = Class.create({
  initialize: function(currentServerTimeInSeconds) {
    this.offset = new Date().getTime() - (currentServerTimeInSeconds * 1000);
  },

  /**
   * Returns an approximation of the current time on the server as of right now.
   */
  get: function() {
    return new Date(new Date().getTime() - this.offset);
  }
});