bugfix Date -> new Date

This commit is contained in:
AJ ONeal 2016-08-08 20:01:22 -04:00
parent 5d8c71a982
commit c3f6bebe2b
2 changed files with 23 additions and 2 deletions

View File

@ -51,12 +51,12 @@ if (require.main === module) {
console.info('');
console.info(c.notBefore.value);
console.info(Date(c.notBefore.value).valueOf());
console.info(new Date(c.notBefore.value).valueOf());
console.info('');
console.info(c.notAfter.value);
console.info(Date(c.notAfter.value).valueOf());
console.info(new Date(c.notAfter.value).valueOf());
console.info('');
}

21
tests/cert-info.js Normal file
View File

@ -0,0 +1,21 @@
'use strict';
var certInfo = require('../lib/cert-info.js');
var c = certInfo.testGetCertInfo();
console.info('');
console.info(c.notBefore.value);
console.info(new Date(c.notBefore.value).valueOf());
console.info('');
console.info(c.notAfter.value);
console.info(new Date(c.notAfter.value).valueOf());
console.info('');
console.info('');
console.info('If we got values at all, it must have passed.');
console.info('');