Fix license expires on to use license_date instead of number of days remaining.

This commit is contained in:
Chris Church
2017-05-02 15:35:49 -04:00
parent e1cb9615cb
commit 22a4279615

View File

@@ -25,11 +25,9 @@ export default
return duration; return duration;
}; };
var calcExpiresOn = function(seconds){
var calcExpiresOn = function(days){
// calculate the expiration date of the license // calculate the expiration date of the license
days = parseInt(days); return moment.unix(seconds).calendar();
return moment().add(days, 'days').calendar();
}; };
var reset = function(){ var reset = function(){
@@ -47,7 +45,7 @@ export default
$scope.license.version = config.version.split('-')[0]; $scope.license.version = config.version.split('-')[0];
$scope.time = {}; $scope.time = {};
$scope.time.remaining = calcDaysRemaining($scope.license.license_info.time_remaining); $scope.time.remaining = calcDaysRemaining($scope.license.license_info.time_remaining);
$scope.time.expiresOn = calcExpiresOn($scope.time.remaining); $scope.time.expiresOn = calcExpiresOn($scope.license.license_info.license_date);
$scope.valid = CheckLicense.valid($scope.license.license_info); $scope.valid = CheckLicense.valid($scope.license.license_info);
$scope.compliant = $scope.license.license_info.compliant; $scope.compliant = $scope.license.license_info.compliant;
Wait('stop'); Wait('stop');