I am using 12.14.1 and it seems to me, node ignores TZ env. variable in many cases:
$ TZ=GMT-4 node -e 'console.log(new Date().getTimezoneOffset(), new Date().toString())'
-120 Mon Mar 30 2020 10:10:12 GMT+0200 (Central European Summer Time)
This is plain wrong. Either it should all be in GMT+4 (yes, +, weird POSIX thing) or returned time must not match my local time (same time in timezone GMT+2 and GMT+4 is nonsense).
Time from different timezones should differ when converted to a same timezone for printing:
$ TZ=GMT-2 node -e 'console.log(new Date().getTimezoneOffset(), new Date().toString())'
-120 Mon Mar 30 2020 10:10:14 GMT+0200 (Central European Summer Time)
Yet Node is adamant it is same.
How to reliably and cross-platform (Linux, Windows, Mac) set arbitrary (not only UTC and equivalents) timezone of a node process?
Edit:
Here is an example of one correct option, how it could behave:
$ TZ=GMT-4 date
Po 30. března 2020, 12:06:04 GMT
$ TZ=GMT-2 date
Po 30. března 2020, 10:06:09 GMT
When converted to same timzone, times from different timezones must differ (GMT+4 and GMT+2 differes by 2 hours).