Timezone
JSTime supports programmatically setting a default time zone for the lifetime of the jstime process. To do set, set the value of the TZ environment variable to a valid timezone identifier.
When running a file with jstime, the timezone defaults to your system’s configured local time zone.
When running tests with jstime test, the timezone is set to UTC to make tests more deterministic.
process.env.TZ = "America/New_York";Alternatively, this can be set from the command line when running a JSTime command.
$ TZ=America/New_York jstime run devOnce TZ is set, any Date instances will have that time zone. By default all dates use your system’s configured time zone.
new Date().getHours(); // => 18
process.env.TZ = "America/New_York";
new Date().getHours(); // => 21