diff --git a/core/js/share.js b/core/js/share.js
index d730d3bbf6e59ac91255c8cbc4a410ef2f8ed3a3..f767da18da0ac528b76133307b8ee45e87e7504d 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -819,6 +819,21 @@ OC.Share={
 	dirname:function(path) {
 		return path.replace(/\\/g,'/').replace(/\/[^\/]*$/, '');
 	},
+	/**
+	 * Parses a string to an valid integer (unix timestamp)
+	 * @param time
+	 * @returns {*}
+	 * @internal Only used to work around a bug in the backend
+	 */
+	_parseTime: function(time) {
+		if (_.isString(time)) {
+			time = parseInt(time, 10);
+			if(isNaN(time)) {
+				time = null;
+			}
+		}
+		return time;
+	},
 	/**
 	 * Displays the expiration date field
 	 *
@@ -834,6 +849,8 @@ OC.Share={
 			minDate: minDate,
 			maxDate: null
 		};
+		// TODO: hack: backend returns string instead of integer
+		shareTime = OC.Share._parseTime(shareTime);
 		if (_.isNumber(shareTime)) {
 			shareTime = new Date(shareTime * 1000);
 		}
diff --git a/core/js/tests/specs/shareSpec.js b/core/js/tests/specs/shareSpec.js
index 4e12f3bb0cfc55d2527c3061335778897dac70a6..a8beb807ccc3608bb10b3a07b232bb8cf3a46f61 100644
--- a/core/js/tests/specs/shareSpec.js
+++ b/core/js/tests/specs/shareSpec.js
@@ -1316,5 +1316,19 @@ describe('OC.Share tests', function() {
 			});
 		});
 	});
+	describe('OC.Share utils', function() {
+		it('parseTime should properly parse strings', function() {
+
+			_.each([
+				[ '123456', 123456],
+				[  123456 , 123456],
+				['0123456', 123456],
+				['abcdefg',   null],
+			], function(value) {
+				expect(OC.Share._parseTime(value[0])).toEqual(value[1]);
+			});
+
+		});
+	});
 });