Skip to content

Commit

Permalink
test: set LC_ALL to known good value
Browse files Browse the repository at this point in the history
Set the locale to a known good value because it affects ICU's date
string formatting. Setting LC_ALL needs to happen before the first
call to `icu::Locale::getDefault()` because ICU caches the result.

Fixes: nodejs#27856

PR-URL: nodejs#28096
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com>
  • Loading branch information
bnoordhuis authored and Trott committed Jun 25, 2019
1 parent 1b3eac4 commit 2bb93e1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/parallel/test-process-env-tz.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
'use strict';

// Set the locale to a known good value because it affects ICU's date string
// formatting. Setting LC_ALL needs to happen before the first call to
// `icu::Locale::getDefault()` because ICU caches the result.
process.env.LC_ALL = 'C';

const common = require('../common');
const assert = require('assert');

Expand Down

0 comments on commit 2bb93e1

Please sign in to comment.