Socket
Socket
Sign inDemoInstall

pg

Package Overview
Dependencies
Maintainers
1
Versions
224
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pg - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

11

lib/types/textParsers.js

@@ -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',

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc