From 7cda67ece1dc035bc7c988da8810088c69be1306 Mon Sep 17 00:00:00 2001 From: Josef Citrine Date: Mon, 19 Dec 2016 23:48:46 +0000 Subject: [PATCH] HWC date check converts local time to UTC --- resources/assets/scripts/app/directives/track-editor.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/assets/scripts/app/directives/track-editor.coffee b/resources/assets/scripts/app/directives/track-editor.coffee index a1ecc94b..e66a4bd6 100644 --- a/resources/assets/scripts/app/directives/track-editor.coffee +++ b/resources/assets/scripts/app/directives/track-editor.coffee @@ -33,7 +33,9 @@ module.exports = angular.module('ponyfm').directive 'pfmTrackEditor', () -> $scope.isAdmin = auth.data.isAdmin albumsDb = {} - $scope.disableHwc = new Date > new Date('2016-12-20 23:59:59') + d = new Date() + currentDate = d.getTime() + (d.getTimezoneOffset() * 60000) + $scope.disableHwc = currentDate > new Date('2016-12-20 23:59:59 GMT') $scope.data = upload $scope.userSlug = $state.params.slug