javascript - Can I make node.js Date always be in UTC/GMT? -


my app runs on linux servers, time (naturally) set utc/gmt. app developed on mac desktops time typically set local timezone.

i change every new date() in code run:

var date = new date().gettime(); 

and ensure dates on server gmt, seems inelegant.

i understand previous versions of node used return utc/gmt. there way bring behavior back?

edit: removed adding timezone offset gettime() per comments - since gettime() in utc.

you can use tz configuration parameter of node.js follows

export tz=utc  nodejs server/index.js 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -