Using JS Date/Time functions in Octave

I’m using Octave to connect an asset to an FX30S, and one of the datapoints we need to capture involves the timestamps.

Since the timestamp format is in epoch, I converted it to a string by creating a new Date object, but the timezone is UTC:

Mon Aug 09 2021 12:51:49 GMT+0000

I tried using toLocaleString() and Date.parse() to change timezones but the string remains unchanged:

var pstTime = date.toLocaleString(“en-CA”, { timeZone: “America/Vancouver”});

ouptut: Mon Aug 09 2021 12:52:53 GMT+0000

At the very least, I’d like to be able to eliminate the “GMT…” part of the string so I can then manually change the hours in the date using get/set methods.