Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-opcua-date-time

Package Overview
Dependencies
Maintainers
1
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-opcua-date-time - npm Package Compare versions

Comparing version 0.1.0-alpha.dc0cce4c to 0.1.1-0

LICENSE

49

package.json
{
"name": "node-opcua-date-time",
"main": "./src/date_time.js",
"version": "0.1.0-alpha.dc0cce4c",
"description": "",
"scripts": {
"test": "mocha test"
},
"dependencies": {
"node-opcua-assert": "^0.1.0-alpha.dc0cce4c",
"underscore": "1.8.3"
},
"devDependencies": {
"bignumber.js": "^4.0.4",
"node-opcua-benchmarker": "^0.1.0-alpha.dc0cce4c",
"node-opcua-binary-stream": "^0.1.0-alpha.dc0cce4c",
"should": "^13.0.1"
}
"name": "node-opcua-date-time",
"main": "./src/date_time.js",
"version": "0.1.1-0",
"description": "pure nodejs OPCUA SDK - module -date-time",
"scripts": {
"test": "mocha test"
},
"dependencies": {
"node-opcua-assert": "^0.1.1-0",
"underscore": "^1.8.3"
},
"devDependencies": {
"bignumber.js": "^5.0.0",
"node-opcua-benchmarker": "^0.1.1-0",
"node-opcua-binary-stream": "^0.1.1-0",
"should": "13.2.0"
},
"author": "Etienne Rossignon",
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/node-opcua/node-opcua.git"
},
"keywords": [
"OPCUA",
"opcua",
"m2m",
"iot",
"opc ua",
"internet of things"
],
"homepage": "http://node-opcua.github.io/"
}

@@ -37,3 +37,3 @@ "use strict";

var fl = factor % F;
var F_div_factor = ( F / factor);
var F_div_factor = (F / factor);

@@ -107,4 +107,4 @@ // Extracted from OpcUA Spec v1.02 : part 6:

var value_h = Math.floor(t * A + B);
var value_l = ( ( t % F + ol ) * fl ) % F;
value_l = ( value_l + F ) % F;
var value_l = ((t % F + ol) * fl) % F;
value_l = (value_l + F) % F;
var high_low = [value_h, value_l];

@@ -131,3 +131,3 @@ Object.defineProperty(date, "high_low", {

// o = oh * F + ol
var value1 = (Math.floor(high / factor) - oh ) * F + Math.floor(( high % factor ) * F_div_factor + low / factor) - ol;
var value1 = (Math.floor(high / factor) - oh) * F + Math.floor((high % factor) * F_div_factor + low / factor) - ol;
var date = new Date(value1);

@@ -150,7 +150,7 @@ // enrich the date

function getCurrentClock() {
var now =new Date();
if (last_now_date && now.getTime() === last_now_date.getTime()) {
last_picoseconds = last_picoseconds+1;
var now = new Date();
if (last_now_date && now.getTime() === last_now_date.getTime()) {
last_picoseconds += 1;
} else {
last_picoseconds = 0;
last_picoseconds = 1;
last_now_date = now;

@@ -164,3 +164,3 @@ }

function coerceClock(timestamp,picoseconds) {
function coerceClock(timestamp, picoseconds) {
if (timestamp) {

@@ -167,0 +167,0 @@ return {

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