diff --git a/Makefile b/Makefile index f338fa1..a57c842 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ ENV_VAR = NODE_ENV=test -all: jshint tests vulnerabilities +all: jshint tests outdated vulnerabilities jshint: $(ENV_VAR) ./node_modules/.bin/jshint index.js lib/* test/* @@ -12,6 +12,9 @@ tests: $(ENV_VAR) ./node_modules/.bin/mocha --check-leaks --recursive ./test vulnerabilities: - ./node_modules/.bin/nsp audit-package + ./node_modules/.bin/nsp audit-package + +outdated: + npm outdated --depth 0 --long .PHONY: all diff --git a/lib/vobject/dateTimeValue.js b/lib/vobject/dateTimeValue.js index 3a6d0b1..fb40077 100644 --- a/lib/vobject/dateTimeValue.js +++ b/lib/vobject/dateTimeValue.js @@ -45,7 +45,7 @@ module.exports = function(dateTimeString) { else { // Absolute DateTime (20130813T173000Z) or Floating DateTime (20130813T173000) dateTimeValue.floatingTime = (ics.indexOf('Z') !== ics.length - 1) ? true : false; - dateTimeValue.dateTime = moment(ics, 'YYYYMMDDTHHmmssZ').utc(); + dateTimeValue.dateTime = moment.utc(ics, 'YYYYMMDDTHHmmssZ'); } }; diff --git a/package.json b/package.json index d9969e3..a38d1fc 100644 --- a/package.json +++ b/package.json @@ -14,10 +14,10 @@ "bugs": { "url": "https://github.com/sunrise/vobject-js/issues" }, - "version": "0.0.33", + "version": "0.0.34", "dependencies": { - "moment-timezone": "0.2.x", - "underscore": "1.7.x" + "moment-timezone": "0.4.0", + "underscore": "1.8.3" }, "devDependencies": { "mocha": "latest", diff --git a/test/vobject/dateTimeValue.js b/test/vobject/dateTimeValue.js index 984ca33..48cde55 100644 --- a/test/vobject/dateTimeValue.js +++ b/test/vobject/dateTimeValue.js @@ -144,6 +144,12 @@ describe('lib/vobject/dateTimeValue.js', function() { assert.equal(dateTimeValue.toICS(), '20130814T063340'); }); + it('should use latest Chilean DST settings', function() { + var dateTimeValue = vobject.dateTimeValue('2015-06-09T14:00:00+00:00'); + dateTimeValue.tzid = 'America/Santiago'; + assert.equal(dateTimeValue.toICS(), '20150609T110000'); + }); + it('should default to absolute time on garbage tzid', function() { var dateTimeValue = vobject.dateTimeValue('2013-08-13T17:33:40-04:00'); dateTimeValue.tzid = 'garbage';