mirror of
https://github.com/nodejs/node.git
synced 2025-05-15 00:52:29 +00:00

Fixes: https://github.com/nodejs/node/issues/4230 Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/38642 Reviewed-By: Steven R Loomis <srloomis@us.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
25 lines
661 B
JavaScript
25 lines
661 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const { isMainThread } = require('worker_threads');
|
|
|
|
if (!common.hasIntl)
|
|
common.skip('Intl not present.');
|
|
|
|
if (!isMainThread)
|
|
common.skip('Test not support running within a worker');
|
|
|
|
const assert = require('assert');
|
|
|
|
process.env.TZ = 'Etc/UTC';
|
|
assert.match(new Date().toString(), /GMT\+0000/);
|
|
|
|
process.env.TZ = 'America/New_York';
|
|
assert.match(new Date().toString(), /Eastern (Standard|Daylight) Time/);
|
|
|
|
process.env.TZ = 'America/Los_Angeles';
|
|
assert.match(new Date().toString(), /Pacific (Standard|Daylight) Time/);
|
|
|
|
process.env.TZ = 'Europe/Dublin';
|
|
assert.match(new Date().toString(), /Irish/);
|