[CORD-2314] Correctly parsing dates when they are formatted as strings

Change-Id: I13b9318d4e20c07a43d3185420cd3a3fab628ee7
diff --git a/src/app/datasources/rest/model.rest.ts b/src/app/datasources/rest/model.rest.ts
index dcec5d4..c63d334 100644
--- a/src/app/datasources/rest/model.rest.ts
+++ b/src/app/datasources/rest/model.rest.ts
@@ -50,10 +50,10 @@
 
     resource.prototype.$save = function() {
 
-      // NOTE converting dates back to timestamp
+      // NOTE converting dates back to timestamp (safety check, dates should not arrive to the client)
       _.forEach(Object.keys(this), (k: string) => {
         if (self.XosFormHelpers._getFieldFormat(this[k]) === 'date') {
-          this[k] = new Date(this[k]).getTime();
+          this[k] = new Date(this[k]).getTime() / 1000;
         }
       });