diff --git a/js/CCNTime.js b/js/CCNTime.js
index 5aafca1..26e98df 100644
--- a/js/CCNTime.js
+++ b/js/CCNTime.js
@@ -4,15 +4,28 @@
  */
 
 var CCNTime = function CCNTime(
-                               //long 
-msec) {
+                               
+		msec) {
 
 
 
 
 	this.NANOS_MAX = 999877929;
 	
-	this.date = new Date(msec);
+	if(typeof msec =='object'){
+		this.setDateBinary(msec);
+		this.msec = msec;
+		this.msecHex = toHex(msec);
+	}
+	else if(typeof msec =='string'){
+		
+		this.msec = toNumbers(msec);
+		this.setDateBinary(this.msec);
+		this.msecHex = msec;
+	}
+	else{
+		if(LOG>1) console.log('UNRECOGNIZED TYPE FOR TIME');
+	}
 };
 
 
@@ -21,18 +34,7 @@
 	 * @param timestamp source timestamp to initialize from, some precision will be lost
 	 */
 
-	/**
-	 * Create a CCNTime
-	 * @param time source Date to initialize from, some precision will be lost
-	 * as CCNTime does not round to unitary milliseconds
-	 */
-CCNTime.prototype.setDate = function(
-	//Date 
-		date) {
 
-	this.date = date;
-};
-	
 	/**
 	 * Create a CCNTime from its binary encoding
 	 * @param binaryTime12 the binary representation of a CCNTime
@@ -50,24 +52,22 @@
 	value = 0;
 	for(i = 0; i < binaryTime12.length; i++) {
 		value = value << 8;
-		// Java will assume the byte is signed, so extend it and trim it.
 		b = (binaryTime12[i]) & 0xFF;
 		value |= b;
 	}
 	
-	this.date = new Date(value);
+	this.date = value;
+	//this.date = new Date(value);
 
 };
 
 //byte[]
 CCNTime.prototype.toBinaryTime = function() {
-	
-	
 
-	return unsignedLongToByteArray(this.date.getTime());
+	return this.msec; //unsignedLongToByteArray(this.date.getTime());
 
 }
-
+/*
 unsignedLongToByteArray= function( value) {
 	if( 0 == value )
 		return [0];
@@ -95,5 +95,5 @@
 			out[ offset - i ] = b;
 	}
 	return out;
-}
+}*/
 	
