Commit 04d3f88c authored by Iván Sánchez Ortega's avatar Iván Sánchez Ortega

Apply timezone offset to printed timestamps

parent a1ac8342
......@@ -34,6 +34,8 @@ const conf = new Configstore('soclial', {
vorpal.log(chalk.purple('>>> User configuration file read.'));
const startTime = new Date();
const timezoneOffset = startTime.getTimezoneOffset();
/// TODO: split handling (and storing), stringifying, and displaying.
function handle(account, data, metadata) {
......@@ -47,6 +49,8 @@ function handle(account, data, metadata) {
timestamp = Date.now();
}
timestamp -= timezoneOffset * 60000;
// https://stackoverflow.com/questions/10645994/node-js-how-to-format-a-date-string-in-utc
let timestampString =
new Date(timestamp)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment