Comparing version 1.0.3 to 1.0.4
@@ -6,4 +6,3 @@ var arrayParser = require(__dirname + "/arrayParser.js"); | ||
//TODO this could do w/ a refactor | ||
var dateMatcher = | ||
/(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})(\.\d{1,})?/; | ||
var dateMatcher = /(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})(\.\d{1,})?/; | ||
@@ -35,6 +34,9 @@ var match = dateMatcher.exec(isoDate); | ||
var tZone = /([Z|+\-])(\d{2})?(\d{2})?/.exec(isoDate.split(' ')[1]); | ||
//match timezones like the following: | ||
//Z (UTC) | ||
//-05 | ||
//+06:30 | ||
var tZone = /([Z|+\-])(\d{2})?:?(\d{2})?/.exec(isoDate.split(' ')[1]); | ||
//minutes to adjust for timezone | ||
var tzAdjust = 0; | ||
if(tZone) { | ||
@@ -58,2 +60,3 @@ var type = tZone[1]; | ||
} | ||
//no timezone information | ||
else { | ||
@@ -60,0 +63,0 @@ return new Date(year, month, day, hour, min, seconds, mili); |
{ | ||
"name": "pg", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "PostgreSQL client - pure javascript & libpq with the same API", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -81,7 +81,7 @@ var helper = require(__dirname + '/test-helper'); | ||
dataTypeID: 1184, | ||
actual: '2010-10-31 14:54:13.74-0530', | ||
actual: '2010-10-31 14:54:13.74-05:30', | ||
expected: function(val) { | ||
assert.UTCDate(val, 2010, 9, 31, 20, 24, 13, 740); | ||
} | ||
},{ | ||
}, { | ||
name: 'timestamptz with other milisecond digits dropped', | ||
@@ -88,0 +88,0 @@ format: 'text', |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1509869
7097