Skip to content

Commit b650339

Browse files
authored
Merge pull request #11 from HB9HIL/fix_utc_n1mm
make sure the parsed timestamp is declared as UTC
2 parents 5824a8f + 7b5f2a0 commit b650339

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ WServer.on('message',async function(msg,info){
229229
xml.parseString(msg.toString(), function (err,dat) {
230230
parsedXML=dat;
231231
});
232-
let qsodatum = new Date(Date.parse(parsedXML.contactinfo.timestamp[0]));
232+
let qsodatum = new Date(Date.parse(parsedXML.contactinfo.timestamp[0]+"Z")); // Added Z to make it UTC
233233
qsodat=fmt(qsodatum);
234234
if (parsedXML.contactinfo.mode[0] == 'USB' || parsedXML.contactinfo.mode[0] == 'LSB') { // TCADIF lib is not capable of using USB/LSB
235235
parsedXML.contactinfo.mode[0]='SSB';

0 commit comments

Comments
 (0)