Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get Date() from companion

ANSWERED

Somebody please help...my forehead is bruised at this point. 

 

There is a glitch in the Ionic Date() function where, if called from the Ionic, does not return the very last part (EDT) or (PST), however, the companion does.

 

Inside my companion/index.js

messaging.peerSocket.onopen = () => {
  console.log("Companion Socket Open");
  console.log(new Date().toString().match(/\(([A-Za-z\s].*)\)/)[1]);
  restoreSettings();
};

logs the correct info.

 

What I can't figure out is how to get that result back to the ionic.  Can someone point me in the right direction?

 

Thanks!

 

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

I figured out a work around...

View best answer in original post

Best Answer
0 Votes
1 REPLY 1

I figured out a work around...

Best Answer
0 Votes