simple-node-logger icon indicating copy to clipboard operation
simple-node-logger copied to clipboard

Is it possible to set the timezone?

Open santi77 opened this issue 5 years ago • 2 comments

The server has the time zone UTC but I want to log GMT-3 or GMT-6 is it possible to do that?

Thanks!

santi77 avatar Mar 02 '19 18:03 santi77

Probably yes, https://momentjs.com/docs/#/displaying/format/

bato3 avatar Mar 07 '19 09:03 bato3

Sorry, but that isn't the solution, in moment.js you have to do:

moment(1369266934311).utcOffset(60).format('YYYY-MM-DD HH:mm') moment(1369266934311).utcOffset('+0100').format('YYYY-MM-DD HH:mm')

to change the timezone, credits: https://stackoverflow.com/a/16703551/244930

but the logger only support the format string

Thank you

santi77 avatar Mar 26 '19 21:03 santi77